Why isn't the text updating?

So what I’m trying to do is that the text label updates the text based on how much time the player has been playing for, but it’s not showing up for some reason.

local Player = game:GetService("Players").LocalPlayer
local statsFolder = Player:WaitForChild("stats")

local text = script.Parent.Text

statsFolder.PlayTime.Changed:Connect(function()
	text = "Time Played: " .. statsFolder.PlayTime.Value
	print("changed") -- the print is for debuging stuff
end)

The print statement is showing up, but the text label doesn’t update.
Help appriciated!

1 Like

because you are storing the current text in a variable and just changing the variable, just do script.Parent.Text = … in the changed event function

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.