PlayerGui not updating

My PlayerGui script is not working for some reason. It’s not updating the text.
Script:

--local script
local player = game.Players.LocalPlayer
local speed = player:WaitForChild("leaderstats"):FindFirstChild("Speed")
local playerGui = player:WaitForChild("PlayerGui")
local SpeedText = playerGui:WaitForChild("MainFrame"):FindFirstChild("SpeedText")

speed.Changed:Connect(function()
	SpeedText.Text = "Speed: "..speed.Value
end)

There are no errors.

try speed.Value.Changed:Connect(function()

Have a great day!

1 Like

Nevermind, I’ve figured it out. I thought that when I join in, it’s actually like the IntValue would get changed but looks like no.