Ok so I have taken away the player's control of their character using the ControllerService, and now I want to make it so that when the player presses the space key, their character jumps. I have this in a LocalScript and it doesn't work. Can anyone figure out why? It works if I use a different key, but I want to use space.
game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
if key == Enum.KeyCode.Space then
if plr.Character:FindFirstChild("on")then
plr.Character.Humanoid.Jump = true
print("jumped")
end
end
end)

1 comment
Accept the answer maybe? Accepting the answer gives you and I 1 reputation.