Every time i touch the brick, the gui appears, but when i touch it again, it doesn't disappear, but clones it self again in the player gui. How can i make it where if i touch it it disappears instead of cloning itself even more? This script is in a regular script.
script.Parent.Touched:connect(function(toucher)
local plr = game:GetService("Players"):GetPlayerFromCharacter(toucher.Parent) or game:GetService("Players"):GetPlayerFromCharacter(toucher.Parent.Parent)
if plr then
local help = game:GetService("ReplicatedStorage"):WaitForChild("Intro")
help:Clone(1).Parent = plr.PlayerGui
else
script.Parent.Touched:connect(function(awsomeness)
local plr = game:GetService("Players"):GetPlayerFromCharacter(awsomeness.Parent) or game("Players"):GetPlayerFromCharacter(awsomeness.Parent.Parent)
if plr then
local off = plr.PlayerGui:WaitForChild("Intro")
off:Destroy()
end
end)
end
end)

2 comments
You want the part or the gui to dissapear?
gui