Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i make a textlabel change depending on my walkspeed? (I'll elaborate in bio)

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.

2 answers

✓ Accepted answer

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.

1 comment

0

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

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

0

Doesn't work for me. I have it in StarterGui > ScreenGui > Frame > TextLabel (called Speed) > LocalScript. The textlabel says "16/416" by default.

0

Did you make sure the walkspeed is actually changing?

0

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.

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

0

Ummmmmm, sorry about that.

0

That happens sometime

0

Tell me if you've figured something out

This discussion is preserved as it was. New answers, comments, and votes are closed.