Im going to use the following script to dont let players jump. This script only works in offline mod.How can i use it for all of the players in server??
1 | local player = game.Players.LocalPlayer |
2 | local human = player.Character:WaitForChild( "Humanoid" ) |
3 | human.Changed:connect( function () |
4 | human.Jump = false ; |
5 | end ) |
It doesnt let localplayer to jump. Help me PLZ
You most likely put it in a localscript in the wrong place, or put it in a script in the right. I've fixed your code. Make sure you put this in a LocalScript inside the playerScripts, StarterPack or StarterGui.
1 | wait(. 1 ) |
2 | local player = game.Players.LocalPlayer |
3 | local human = player.Character:WaitForChild( "Humanoid" ) |
4 | human.JumpPower = 0 |
there you go! Hope I helped. :D If I did, hit that accept button!
(Also, the semicolen is not needed in Lua coding)
EDIT: just an FYI, JumpPower is how high the humanoid can jump.