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

Why does this script work in SOLO mode, but not in the actual game?

Asked by 10 years ago

This is supposed to dis-able jumping. It works in SOLO play on ROBLOX Studio, but not in the actual game.

--Here is the script--

1print("aase69's AWESOME NonJump script - Loaded")
2function onChanged()
3script.Parent.Parent.Character.Humanoid.Jump = false
4end
5script.Parent.Parent.Character.Humanoid.Changed:connect(onChanged)

--this is not my script--

2 answers

Log in to vote
1
Answered by 10 years ago

The script is probably loading itself faster than it can find the humaoid. At the beginning in the script, add:

1Player = game.Players.LocalPlayer
2repeat wait() until Player.Character
3Character = Player.Character
4Character:WaitForChild("Humanoid")
0
Thank you so much, That and putting it in StartGUI instead of StartPack worked! Thank you, and Merry Christmas yogipanda123 120 — 10y
Ad
Log in to vote
1
Answered by 10 years ago

Is it a local script in the StarterGui? If not, do that.

0
No, it wasn't thank you! yogipanda123 120 — 10y

Answer this question