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

Jump prevention script? (SOLVED)

Hey, I made a jump prevention scripts and I put it in local script in workspace. Whenever I use this script


local Player = game:service'Players'.LocalPlayer 
local Character = Player.Character 
local Humanoid = Character:findFirstChild("Humanoid") 
Humanoid.Changed:connect(function() 
    Humanoid.Jump = false 
end) 

I always get an error saying I'm calling a "nil" object, which means does not exist. What's wrong with my scripts? Can you help me?

1 answer

✓ Accepted answer

Put this script in a localscript in StarterPack [EDITED: 11:53 AM]


local Player = game:GetService('Players').LocalPlayer
repeat wait() until Player.Character
local Character = Player.Character
local Humanoid = Character:WaitForChild("Humanoid") 
Humanoid.Changed:connect(function()
    Humanoid.Jump = false
end)

1 comment

0

Awesome it works! Thanks!

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