I'm trying to find a script that when you touch a block a gui pops up for about (5)secs and then destroys the gui!
Thanks,
Exsius,
I tried doing
p = script.Parent gui = p.Gui p.Touched:connect(function(hit) plr = game.Players:findFirstChild(hit.Parent.Name) gui:clone().Parent = plr.PlayerGui wait(5) gui:Remove() end)
but it wouldn't destroy itself and disappear...
Put the script inside of a brick, put your GUI inside of the script.
local gui = script["GUINAME"] local db = true script.Parent.Touched:connect(function(hit) if hit.Parent:findFirstChild("Humanoid") and db then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr and not plr.PlayerGui:findFirstChild(gui.Name) then db = false local cl = gui:Clone() cl.Parent = plr.PlayerGui game.Debris:AddItem(cl, 5) wait() db = true end end end)