I have this script to check if the GUI is already open in the screen,
script.Parent.ClickDetector.MouseClick:Connect(function(plr)
if plr:GetRankInGroup(groupID) >= minRank then
if not plr.PlayerGui:FindFirstChild("GateScreensControl") then
--Code
end
end
end)
It works the first time, but when I close the Gui (:Destroy()) and then re-run the script it no longer works. Any idea why?
But if the gui dissapears you don’t move it across the game to workspace or so, you put it on invisible or disabled right? that’s why its still in findfirstchild