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

TextLabel's Text not Updating?

I have been struggling with this for a while now, and i felt like reaching out to the scripting community for help, the point is, I'm trying to update this text to every second, but nothing is happening, it even gets to that part, but no updating.

Code:


local text = script.Parent.Text
while true do
	wait(1)
	print("got here")
	for e = 10,0,-1 do
		print("got here")
		wait(1)
		text = "The Plane Will Arrive in"..e.." Seconds!"
	end
	wait(1)
	for i = 30,0,-1 do
		wait(1)
	text = "The Plane Will Leave in "..i.." Seconds!"
	end
	for q = 115,0,-1 do
		wait(1)
		text = "The Plane Will Regen in"..q.." Seconds!"
	end
end

3 comments

0

oh god why don't you just use for loops and a single while loop instead of that

0

i tried that but, i thought the for loops and while loops were the problems, i'll change it so it'll look better

0

done.

1 answer

✓ Accepted answer

If you create a variable called text = script.Parent.Text, it will return the text of the textlabel that was set at the time, and not a directory for the textlabel property itself. For example, if the textlabel text was "Hello World" and you reference it, the variable will be a string saying "Hello World", even if you change the actual textlabel text to something like "Planes are awesome".

Instead, use script.Parent.Text = textyouwanttouse

1 comment

0

Didnt know text worked that way, Thanks!

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