so im making a 2d game, but everytime the player press A / D he flicks, if he is jumping he tp's to the ground
that's my code:
game.ReplicatedStorage.Movement.A.OnServerEvent:Connect(function(plr) plr.Character.HumanoidRootPart.Orientation = Vector3.new(plr.Character.HumanoidRootPart.Orientation.X,90,plr.Character.HumanoidRootPart.Orientation.Z) end) game.ReplicatedStorage.Movement.D.OnServerEvent:Connect(function(plr) plr.Character.HumanoidRootPart.Orientation = Vector3.new(plr.Character.HumanoidRootPart.Orientation.X,-90,plr.Character.HumanoidRootPart.Orientation.Z) end)
if you need more info, comment
You can use ContextActionService for unbinding certain movement keys.
You can find info about it here: https://developer.roblox.com/en-us/api-reference/class/ContextActionService
I hope this helped!