I have a surface gui with an adornee of a brick in the workspace. I want to get rid of it using a script that channels through the playergui and deletes it in there. I do that and it gets rid of it, but when the player resets it comes back, and it will come back no matter what i try. Is getting rid of it even possible?
I have asked this before but I actually haven't found a solution yet.
If there was a OnSpawn or OnReset event or function or whatever, I could use that. But I don't know what I could use
Hello, Red_Musician!
If I understood well, you want to remove a component with scripts, right?
Thats easy:
--Lets create a part just to have something to remove... Instance.New("Part").Parent = game.Workspace --Now lets destroy it game.Workspace.Part:Destroy() -- game.Workspace.Part = Find the part with scripts :Destroy() = Remove the part
The ":Destroy()" method can be used to destroy anything... A player, a part(same as the example), A Gui...
If you want to disable a GUI when the player die and it don't apear anymore just disable "Reset on spawn" on the GUI
Good luck with your games!