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

how do i remove a gui after wait? [closed]

Asked by 6 years ago

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?

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?

1 answer

Log in to vote
0
Answered by
Nikkulaos 229 Moderation Voter
6 years ago
Edited 6 years ago

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)
0
yw :P Tell me if it works or not Nikkulaos 229 — 6y
0
wait where do i put it? abcmohammeddef -7 — 6y
0
I updated the answer, check now Nikkulaos 229 — 6y
0
are frame and gui the same thing? abcmohammeddef -7 — 6y
View all comments (4 more)
0
i have StarterGui>ScreenGui>Frame>then 3 more text labels abcmohammeddef -7 — 6y
0
Put your ScreenGui in serverstorage then replace the "Gui" in local Gui = game.ServerStorage.Gui:Clone() to your ScreenGui's name Nikkulaos 229 — 6y
0
tysm it worked :D abcmohammeddef -7 — 6y
0
Your welcome :P Nikkulaos 229 — 6y
Ad