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

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

Asked by 5 years ago
Edited 5 years ago

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

0
Use a for loop, this is a mess programmerHere 371 — 5y

5 answers

Log in to vote
0
Answered by 5 years ago

Could just do something like this..

local gui = script.Parent.ScreenGui.Frame

gui.Visible = true
0
thanks! do i put this in StarterGui or workspace? <3 ChippyX 2 — 5y
0
StarterGui ForeverBrown 356 — 5y
0
thank uuu :) ChippyX 2 — 5y
Ad
Log in to vote
0
Answered by
hoth7 45
5 years ago
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
Log in to vote
0
Answered by 5 years ago

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
0
thank u!! this helps <3 ChippyX 2 — 5y
Log in to vote
0
Answered by
BryanFehr 133
5 years ago

I mean you could just use a wait;

local gui = script.Parent

wait(5)
gui.Visible = true
Log in to vote
0
Answered by 5 years ago
local gui = script.Parent
gui.Visible = false
wait(360)
gui.Visible = true

Answer this question