Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

why it works only in offline mod??

Asked by 8 years ago

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??

local player=game.Players.LocalPlayer
local human=player.Character:WaitForChild("Humanoid")
human.Changed:connect(function()
human.Jump=false;
end)

It doesnt let localplayer to jump. Help me PLZ

1 answer

Log in to vote
1
Answered by 8 years ago

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.

wait(.1)
local player=game.Players.LocalPlayer
local human=player.Character:WaitForChild("Humanoid")
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.

0
JumpPower isn't a linear how-many-studs-can-a-player-jump. It's the force behind how mighty their jump is. The default is I think 50, but 25 is a quater the height, and 100 is 4 times as much. adark 5487 — 8y
0
Thanks guys sina1393 15 — 8y
0
Sorry. Tehe ChemicalHex 979 — 8y
Ad

Answer this question