Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make player not able to jump?

function OnEntered(Player)
	while Player.Character == nil do
		wait()
	end
end
function OnRespawned(Character)
	local Torso = Character:findFirstChild("Torso")
	if Torso ~= nil then
		local AntiJump = Instance.new("BodyPosition")
		AntiJump.Parent = Torso
		AntiJump.position = Vector3.new (0,6,0)
		AntiJump.maxForce = Vector3.new (0,10000000000,0)
	end
end
game.Players.ChildAdded:connect(OnEntered)
game.Workspace.ChildAdded:connect(OnRespawned)

I have been using this script and you are still able to jump. Could anyone fix this so no players will be able to jump?

1 answer

✓ Accepted answer

Try this:

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local Human = char:FindFirstChild("Humanoid", true)
Human.Changed:connect(function()
Human.Jump = false
end)
end)
end)

3 comments

0

It worked. Thank you!

0

Please don't just post code, explain what you're doing.

0

Nothing much to explain, it's pretty straightforward.

This discussion is preserved as it was. New answers, comments, and votes are closed.