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

Jump prevention script? (SOLVED) [closed]

Asked by 9 years ago

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?

Locked by Tortelloni, TurboFusion, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Thetacah 712 Moderation Voter
9 years ago

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)
0
Awesome it works! Thanks! GreekGodOfMLG 244 — 9y
Ad