so i have a gui on my screen and i want to use a script to get rid of it after like 5 seconds can someone help me?
COMMUNITY QUESTION
how do i remove a gui after wait?
1 answer
You could do something like this:
This is the local script version (put this in startergui/starterplayerscripts):
local player = game.Players.LocalPlayer
local Gui = game.ServerStorage.Gui:Clone()
Gui.Parent = player.PlayerGui
game:GetService("Debris"):AddItem(Gui,5)--This removes the Gui after 5 seconds.
Server Script Version (Put this in serverscriptservice):
game.Players.PlayerAdded:Connect(function(player)
local Gui = game.ServerStorage.Gui:Clone()
Gui.Parent = player.PlayerGui
game:GetService("Debris"):AddItem(Gui,5)--This removes the Gui after 5 seconds.
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

8 comments
yw :P Tell me if it works or not
wait where do i put it?
I updated the answer, check now
are frame and gui the same thing?
i have StarterGui>ScreenGui>Frame>then 3 more text labels
Put your ScreenGui in serverstorage then replace the "Gui" in local Gui = game.ServerStorage.Gui:Clone() to your ScreenGui's name
tysm it worked :D
Your welcome :P