Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
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..

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. AntiWorldliness 868 — 3y

2 answers

Log in to vote
2
Answered by 3 years ago

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
0
Thank you! nikodemos333V2 7 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

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
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. MrBlockyhead 84 — 3y

Answer this question