UIS = game:GetService('UserInputService')
UIS.InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.Space then
game.Players.LocalPlayer.Character.Humanoid.Jump = false
print'you cant jump boi'
end
end)
It prints but it does not prevent jumping at all. Ive also tried setting HumanoidStateType to None but that doesen't work either. Could someone fill me in on how i'm supposed to prevent jumping properly?

13 comments
Doesn't work and doesn't print anything if I put a print in it.
I tested it and it worked. Make sure it's in a normal Script inside workspace and its not disabled.
Any way I could apply this in a LocalScript?
And by the way, the right way to print is: print("what you want to print here") or print('what you want to print here')
Updated my reply with the way to do it for a LocalScript
Out of curiosity, my setup was http://i.imgur.com/5fGZIsZ.png, which im pretty sure is identical to that. Why isnt mine working?
Your print wont work because it's not written appropriately. As for the jump part it really should work, remove what you've written before about UserInputServcice.
Also your code doesen't work either.
And that IS the correct way to print. Ive done it before in the same way with a string.
Oh my bad that printing method does work. Sorry didn't know about it. 1sec I'll test the method with the Local Script. I DID test the global script way tho, and it worked for me.
Yep, the Local Script way did work. Just literally try it with ONLY that in your script.
Eh i can just use the global
It works better in a LocalScript tho. Try it, just don't put anything else and put it in StarterPack