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

ScreenGUI not changing signs with the while true do script. How do I fix that?

So I'm coding something for an MTA group, and the ScreenGUI's text is not looping, is it because I need to have the frame visible and invisible during that time. I know how to code it on a SurfaceGUI, but it doesn't work on ScreenGUI, Here's the code:

local display = (script.Parent.Parent.Frame.TextLabel)

while true do
	display.Text = "WEST HEMPSTEAD TRAIN"
	wait(1.5)
	display.Text = "NEXT STOP"
	wait(1.5)
	display.Text = "VALLEY STREAM"
	wait(1.5)
	display.text = "TRAIN 6900"
	wait(1.5)	
end

3 answers

You didn't capitalize the bottom .Text so that probably breaks it.

Remove the brackets in the variable since you don't need them and test again

2 comments

0

What brackets?

0

Nguyen is right. He means remove the parenthesis in your variable. I think people in the UK call them brackets.

Versus using variables, you might be able to do this:

while true do
    workspace.SurfaceGui.Text = "WEST HEMPSTEAD TRAIN"
    wait(1.5)
      workspace.SurfaceGui.Text = "NEXT STOP"
    wait(1.5)
      workspace.SurfaceGui.Text = "VALLEY STREAM"
    wait(1.5)
      workspace.SurfaceGui.Text = "TRAIN 6900"  -- Some of this may differ depending where the TextLabel is.
    wait(1.5)   

end

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