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--

print("aase69's AWESOME NonJump script - Loaded")
function onChanged()
script.Parent.Parent.Character.Humanoid.Jump = false
end
script.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:

Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Character = Player.Character
Character: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