Thanks for looking at my question, I'll dive right into it.
So Basically...
I want a ScreenGui to be removed forever and ever once a player clicks a certain button. I've tried using function HasPressedPlay()
and if they pressed play, then script.Parent.Parent.Parent.Parent = nil
but whenever I die AKA reset, The ScreenGui would still appear. I would suggest try using onDied Event()
but I wouldn't know how to. So I think checking and keeping a record on a player if they pressed play, and if they leave the game, the record will be deleted and will be kept anew. I know this is confusing, which is completely my fault, but there's some theorems to help you guys solve my problem. So, can you help me? Thank you!
GreekGodOfMLG
Alright. Firstly insert a script into workspace and put your desired gui in it.
Now put this code in the script:
game.Players.PlayerAdded:connect(function(player) repeat wait() until player.Character repeat wait() until player.Character:FindFirstChild("Humanoid") local gui = script.GuiName:Clone() -- change 'GuiName' to your gui's name gui.Parent = player.StarterGui end)
Now all you have to do is when the player click the play button, destroy the gui and the gui won't even come back unless the player rejoins.
If you have any more questions about this, or any other topics, Feel free to shoot me a tweet @ObscureRBLX or send me a PM (my username is ObscureEntity)