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

How to loop a gui to repeatedly open every 10 seconds?

while true do
	game.StarterGui.Ad1.Advertisment1.Visible = true
	wait(10)
end

is what i tried. but it only opens once. pls help theres almost no source which could help me with it..

1 comment

0

I know somebody already answered this, but StarterGui only affects what the player sees when they join/reset. PlayerGui is what they are currently seeing on their screen, so you need to change that instead of StarterGui.

2 answers

✓ Accepted answer

You have to put this script as a local script in the menu (The Advertisment1 Menu)

while true do
    script.Parent.Visible = true
    wait(10)
end

1 comment

0

Thank you!

So basically your going to want to write your code like this.

while true do
    wait(10)
    game.StarterGui.Ad1.Advertisment1.Visible = true
end

1 comment

1

This is the same script that nikodemos provided, except the wait is first. This solution won't work, because the change needs to be applied to the GUI in the player's character, not in StarterGui.

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