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

Help with making a gui pop up every few seconds?

I have tried this over and over and it never worked no matter what I did. WHAT IS GOING ON?!?!

while true do
	wait(10)
	game.StarterGui.Ad.Rockets.Visible = true
	wait(10)
	game.StarterGui.Ad.Play.Visible = true
	wait(10)
	game.StarterGui.Ad.Computer.Visible = true
	wait(10)
	game.StarterGui.Ad.Disaster.Visible = true
end

1 comment

0

is it active?

4 answers

You can try using repeat, see if that works

repeat
02
    wait(10)
03
    game.StarterGui.Ad.Rockets.Visible = true
04
    wait(10)
05
    game.StarterGui.Ad.Play.Visible = true
06
    wait(10)
07
    game.StarterGui.Ad.Computer.Visible = true
08
    wait(10)
09
    game.StarterGui.Ad.Disaster.Visible = true
10
until nil

2 comments

0

As JSAcela said, repeat would work well. Personally, I would do this

0

That wont make any difference; he was originally using a loop to begin with.

u need to set it to false at one point

2 comments

0

Not true at all. Where did you learn to script?

0

Its actually true @JSAcela look at the way @EliteJcoombs as put it to false at one point.

As JSAcela said, repeat works well. Though, I personally would do this:

repeat

	wait(10)
		game.StarterGui.Ad.Rockets.Visible = true
	wait(10)
		game.StarterGui.Ad.Rockets.Visible = false
		game.StarterGui.Ad.Play.Visible = true
	wait(10)
		game.StarterGui.Ad.Play.Visible = false
		game.StarterGui.Ad.Computer.Visible = true
	wait(10)
		game.StarterGui.Ad.Computer.Visible = false
		game.StarterGui.Ad.Disaster.Visible = true
	wait(10)
		game.StarterGui.Ad.Disaster.Visible = false
	
until nil

1 comment

0

That wont make any difference; he was originally using a loop to begin with.

game.StarterGui.Ad.Rockets.Visible = true won't do anything because when the player plays the game every GUI goes to PlayerGui which can be accesed by game.Players.LocalPlayer.PlayerGui Though if you put your script inside of your "Rockets" and do script.Parent.Visible = true Its easier. And We cant give you the full script here so you would have to figure the rest of the script yourself. Learn more about this here

and here

If i helped make sure to click the "Accept Answer" button.

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