Local TextLable Not Changing

So I have been learning about local scripts and changing Gui text. I’v gotten some stuff to work with help from the community that Im slowly understanding, but for the life of me I cant seem to figure out why this simple script doesn’t work as expected:

local timer = script.Parent.Text
local gameTime = 60
timer = gameTime

This is a Local Script within a TextLable. Please if you can, keep it as simple as possible for I am still learning how to do a lot of things here.

Thanks

1 Like

To set the text, you just have to save the object and then do timer.Text = gametime.

Otherwise you’re just storing what the current text is in a variable.

can you elaborate on what you mean by “Save the Object” please?

Saving an object as a variable just means saving the path. ex: local textlabel = script.Parent
“.Text” is a property and it needs to be changed by indexing it from the object.

1 Like

ok that seems to make sense to me, but what is the process to index it so that the text value will actually change?

local textlabel = script.Parent --this can be a variable
textlabel.Text = “text here”

2 Likes