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?
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)
Closed as Too Broad by Goulstem
This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.
Why was this question closed?