So i have a gui that has a textlabel that says "16/416", i need it to increase the number by how much my walkspeed increases if that makes sense.. So i need the label to say "(my walkspeed)/416" depending on my walkspeed. I've tried with putting a Numbervalue in my TextLabel, but didn't know where the local script should go, nor what code should be inside of it. Any help is appreciated. Thank you in advance.
How do i make a textlabel change depending on my walkspeed? (I'll elaborate in bio)
2 answers
It is pretty easy. Just put this LocalScript into "StarterPlayerScripts"
local textlabel = --Location of Label
local hum = game.Players.LocalPlayer.Character.Humanoid
while true do
wait(0.1)
textlabel.Text = hum.WalkSpeed .. "/416"
end
I did not test this, so it may not work.
Here is a working script to use.
PLACE THE LOCALSCRIPT INSIDE THE TEXTLABEL!
local label = script.Parent
local player = game.Players.LocalPlayer.Character:Wait() and game.Players.LocalPlayer.Character
while wait() do
label.Text = player.WalkSpeed.."/416"
end)
29 comments
Doesn't work for me. I have it in StarterGui > ScreenGui > Frame > TextLabel (called Speed) > LocalScript. The textlabel says "16/416" by default.
Did you make sure the walkspeed is actually changing?
Yes, each time i press 'Q' the speed increases, the max is 416 and min is 16, each time i press 'E' the speed decreases.
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
Ummmmmm, sorry about that.
That happens sometime
Tell me if you've figured something out
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You can access the GUIS from Players by game.Players.LocalPlayer.PlayerGui.(GuiName) This works for localscripts only.