Players Walk speed on textgui

Does anyone know how I can display the players walkspeed on a textgui?

Just write this in a localscript:

local textlabel = --the textlabel where you want to display the walkspeed

textlabel.Text = game.Players.LocalPlayer.WalkSpeed

well that would work but only once
and moreover it would display 16 forever (even after the speed has changed)
check this out

local ui = --put the text label here
game:GetService("RunService").RenderStepped:Connect(functions()
ui.Text = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed
end)

Add a Local script inside of the TextLabel (Also @kittyPGR Why are using RunService there is an Event which is called ‘GetPropertyChangedSignal’

game.Players.LocalPlayer:WaitForChild("Humanoid"):GetPropertyChangedSignal("WalkSpeed"):Connect(function()
script.Parent.Text = game.Players.LocalPlayer.Humanoid.WalkSpeed
end)

hmm… I completely forgot about that function

1 Like

more clear script:

local player = game.Players.LocalPlayer
local textlabel = wherever it is
player.Character.Humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
textlabel.Text = player.Character.Humanoid.WalkSpeed
end)