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

for some reason it is only visible and after 15 seconds it stays visible. Help?

Asked by 4 years ago
while true do
    game.StarterGui.ScreenGui.Frame.Visible = true
    wait(15)
    game.StarterGui.ScreenGui.Frame.Visible = false
    wait(1800)
    game.StarterGui.ScreenGui.Frame.Visible = true
    wait(15)
    game.StarterGui.ScreenGui.Frame.Visible = false
    wait(1800)
end

for some reason it is only visible and after 15 seconds it stays visible. Help?

2 answers

Log in to vote
1
Answered by
SpiralRBX 224 Moderation Voter
4 years ago
Edited 4 years ago

I am not sure what you are trying to achieve, please be more specific next time, but I can explain it for you.

while true do
    game.StarterGui.ScreenGui.Frame.Visible = true --//Setting it as visible
    wait(15) --//Wait 15 seconds
    game.StarterGui.ScreenGui.Frame.Visible = false --//Setting it as not visible. 
    wait(1800)
    game.StarterGui.ScreenGui.Frame.Visible = true --//Setting it as visible
    wait(15)
    game.StarterGui.ScreenGui.Frame.Visible = false --//Setting it as not visible. 
    wait(1800)
end
game.StarterGui.ScreenGui.Frame.Visible = false

That will make the frame not visible.

Sorry if I didn't answer it, i barely understood it.

EDIT: Realized the script wont work because your calling ScreenGui.

Do this:

while true do
    script.Parent.Frame.Visible = true --//Setting it as visible
    wait(15) --//Wait 15 seconds
    script.Parent.Frame.Visible = false --//Setting it as not visible. 
    wait(1800)
    script.Parent.Frame.Visible = true --//Setting it as visible
    wait(15)
    script.Parent.Frame.Visible = false --//Setting it as not visible. 
    wait(1800)
end

and put the script in the ScreenGui

0
Lol I’m sorry for not being specific. I will do better next time. Configuator 158 — 4y
0
Alr thank you. If i helped you feel free to mark it as answered! ^^ @NumberDoge SpiralRBX 224 — 4y
0
One Thing. Do I put the script in a server script inside of screen gui? Configuator 158 — 4y
Ad
Log in to vote
-1
Answered by
mniao 15
4 years ago

The "Wait()" is in seconds

so you are setting the visiblity to true then waiting 15 seconds then waiting 1800 seconds

Answer this question