I was working a game which has more to come but I made it multi platformed gui so if you clicked on one of the options (pc, mobile) it would fit the gui to that screen (ui scaling) whenever you die or reset the gui pops up again. I tried to make it not pop up again with a local script with the following I set the gui enablility to false for the script
script.parent.Enabled = true
if script.parent.Enabled == false then
script:Destroy()
end
It might not make sense to you because I put a local script when you clicked a button, what it would do is set the gui enability to false. by destroying the script the gui would not appear since its true enability is false and the local script is the only thing making it true

3 comments
you did not put parent
what if I want to destroy the script
yea u do script.Parent:Destroy()