Skip to content

Instantly share code, notes, and snippets.

import Signal from "@rbxts/lemon-signal";
import { UserInputService } from "@rbxts/services";
import { InputAction } from "../ClientTypes";
import Actions from "./Actions";
namespace InputManager {
export const ActionBegan = new Signal<InputAction>();
export const ActionEnded = new Signal<InputAction>();
const _actionsSignals = new Map<string, Signal<InputAction>>();
--- Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
--- Instances
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera