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 seconds?

Asked by 4 years ago
Edited 4 years ago

``The script i used:

local GUI = script.Parent.Play
while true do
wait(48)
script.Parent.GUI.Visible = true
--// And make it invisible again after a certain time
wait(9999999)
script.Parent.GUI.Visible = false
end

Doesnt work. By the way it might sound dumb since im new to scripting. (Putting full script would help)

3 answers

Log in to vote
1
Answered by 4 years ago

put a local script inside the screen gui then make the enabled set to false then paste this

while true do
    wait(48)
    script.Parent.Enabled = true
    wait(9999999)
    script.Parent.Enabled = false
end

this works because I tested it and know it does.

0
Wow our's are really similar except mine doesn't work because I suck at scripting XD StockBAMBAM 7 — 4y
Ad
Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

I think that I would do

script.Parent.Visible = true
wait(99999999999)
script.Parent.Visible = false

by the way: I don't think it's possible to close a gui. try making a frame and all the content in the frame.

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago
while true do
    wait(48)
    script.Parent.Enabled = true
    --// And make it invisible again after a certain time
    wait(9999999)
    script.Parent.Enabled = false
end

put this script in the gui and make the script be a local script

Answer this question