I tried making a gui that pops up when you touch a brick and I put a wait 5 seconds and remove the gui but it does not work. Heres what I put
GUI = game.Lighting.TryAgain
script.Parent.Touched:connect(function (hit)
if hit.Parent and game.Players:FindFirstChild(hit.Parent.Name) then
Play = game.Players[hit.Parent.Name]
if Play:FindFirstChild("PlayerGui") and not Play.PlayerGui:FindFirstChild(GUI.Name) then
GUI:Clone().Parent = Play.PlayerGui
wait(5)
GUI:remove()--here's where it does not work it would keep the gui there
end
end
end)

2 comments
It is not removing the Cloned 'GUI', it is removing the original, consider using a Variable/Identifier? http://wiki.roblox.com/index.php?title=Variable
I don't understand that