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

Why doesn't this script capture humanoid changes in online mode? [closed]

I'm developing a game that involves conveyors, but everyone knows that you can simply bunnyhop across it. So I wrote a script that set the players' Jump value to false every time the humanoid changed. It works absolutely fine in offline mode, but in online mode it doesn't respond when the humanoid changes. Could any one help me? (By the way, FilteringEnabled is not on.)

wait(1)
local h=script.Parent.Parent.Character.Humanoid
function disable()
	h.Jump=false
end
script.Parent.Parent.Character.Humanoid.Changed:connect(disable)

Also, the script is in PlayerGui.

1 answer

Would this help?

wait(0.5)
local Human = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")
Human.Changed:connect(function()
	Human.Jump = false
end)

4 comments

0

I'm printing the name of the humanoid, so I know that in fact it is there. This script does not work, unfortunately.

0

You need to put the script into a LocalScript into StarterGui

0

I figured out what was wrong. The Humanoid doesn't change upon jumping. You have to use the KeyDown event, but even then the jumping event has already fired and there's nothing you can do. BodyVelocity's and BodyForces don't work either.

0

Well, it worked 100% for me!

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