So I wanted to make some sort of script that detects if a gui exist or not but I don't know what I should do. can someone help?
if script.Addon == true then script.Addon.Parent = game.StarterGui else script.Parent:Destroy() end
use :FindFirstChild("ITEM NAME")
here is a wiki page of FindFirstChild: Wiki - FindFirstChild
Here is your Fixed Script.
if script:FindFirstChild("Addon") then script.Addon.Parent = game.StarterGui -- This not send for all players, you need to send to PlayerGui. else script.Parent:Destroy() wait(3) -- For no errors on remove the item. end
Hope it helped :D