How do I make a button that makes a frame UI visible for 3 seconds then automatically makes it invisible? Please tell me how to do this.
COMMUNITY QUESTION
How to make a button that opens a frame then automatically closes it after 3 seconds?
1 answer
Here is a simple script to understand, perfectly labeled and it does what you want!
The script + instructions:
-- Insert a screengui in startergui
-- Insert a frame and textbutton and name and design them however u like
-- Insert a localscript inside textbutton and type in the below
db = false -- The debounce[Debounce added because it's the cooldown!]
script.Parent.MouseButton1Click:Connect(function() -- When button is clicked...
if db == false then -- If the debounce is false then...
db = true -- The debounce becomes to true
script.Parent.Parent.Frame.Visible = true -- When
wait(3) -- Waiting time before the frame goes invisible, also cooldown time
script.Parent.Parent.Frame.Visible = false -- After wait time the frame goes invisible
print("IT WORKED!") -- Making sure it works
db = false -- Debounce ended
end -- A end
end) -- THE END...
If for some weird reason it doesn't work [worked for me] then comment back and i'll get back to you as soon as possible!
I hope this helped!
1 comment
0
I hope all the labeling didn't make the script messy and hard to understand.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Please at least try something first yourself. This is NOT a request site.
Gui or An object button?