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

how do i make a GUI pop up after a certain amount of time?

i'm working on a fnaf parody game. i've got a time system (12-6 am) working and that's good and all, but i really need a way for a GUI to become visible once the time hits 6 am (360 seconds irl) to be like a 'you won' screen. i've tried wait commands and stuff, but i'm still kind of struggling. i'm also not very sure if i need to put the GUI wait script into the GUI itself or into workspace? (i'm new to scripting lol, i'm srry if this sounds dumb.)

i'll appreciate it if anyone can help! :) <3

1 comment

0

Use a for loop, this is a mess

5 answers

✓ Accepted answer

Could just do something like this..

local gui = script.Parent.ScreenGui.Frame

gui.Visible = true

3 comments

0

thanks! do i put this in StarterGui or workspace? <3

0

StarterGui

0

thank uuu :)

local GUI = script.Parent.(gui name here)
--// Try this
while true do
wait(360)
script.Parent.GUI.Visible = true
--// And make it invisible again after a certain time
wait(5)
script.Parent.GUI.Visible = false
end
--// This may work idk

not an answer to ur answer but pls dont repeat yourself in this way, make a variable for the text so it could look like this

local text = script.Parent.Text
while true do
    text  = "12 AM"
    wait(59)
    text  = "1 AM"
    wait(59)
    text  = "2 AM"
    wait(59)
    text  = "3 AM"
    wait(59)
    text  = "4 AM"
    wait(59)
    text  = "5 AM"
    wait(59)
   text  = "6 AM"
    end

1 comment

0

thank u!! this helps <3

I mean you could just use a wait;

local gui = script.Parent

wait(5)
gui.Visible = true
local gui = script.Parent
gui.Visible = false
wait(360)
gui.Visible = true

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