Can't figure out how to make that function, could someone send me a link to the wiki or a video on how to do it (or just show how to do it), I've been looking and they're all horribly outdated. (Im making a brick move when you hold down either WASD) all I've done is this:
local tabDown = false local input = game:GetService("UserInputService") local player = game.Players.LocalPlayer local prog = 0 local RunService = game:GetService("RunService") move = workspace.CamPart.RemoteEvent cam = workspace.CamPart velocity = cam.BodyVelocity.Velocity event = Vector3.new(0,0,0)
input.InputBegan:connect(function(k) local key = k.KeyCode if key == Enum.KeyCode.A then tabDown = true event = Vector3.new(25,0,0) move:FireServer(event)
elseif key == Enum.KeyCode.D then tabDown = true event = Vector3.new(-25,0,0) move:FireServer(event) end end)

3 comments
Would it be mouse.KeyDown:connect(function(key) or no?
what do you exactly want to do?
Mouse.KeyDown is deprecated. UserInputService is both actively supported and more versatile.