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

Changing humanoid speed and jump using GUI help!?

Asked by
Coder_1 27
4 years ago

Help https://gyazo.com/9370c11f61a8ac392097138428b9a343 A gif of me doing it in studio

The error 14:03:01.276 - Players.Coder_1.PlayerGui.set.Frame.TextButton.LocalScript:6: attempt to compare number and nil

lua
--source of error
if speed > max then
--my max is defined before this 
local max =  game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Points").Value /20 +1
-- i gave it enough time for it to load so its not time and every player has a value?

Any help is taken thanks!!

0
I suggest using tonumber as it converts a string to a number. JesseSong 3916 — 4y
0
Can you show us what you have "speed" defined as? TaxesArentAwesome 514 — 4y

Answer this question