Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I make this delete permanently in my local script?

I already have the delete script, but how would I make the delete permanent? For example, when I click the button, it deletes it, then when you die it just comes back up. I wish for it to STAY deleted until the player rejoins. Here's the local script:

local frame=script.Parent.Parent.Parent:WaitForChild("Frame")

script.Parent.MouseButton1Down:connect(function()
    frame.Visible=not frame.visible
script.Parent:Destroy()

end)

1 answer

✓ Accepted answer

Don't put it in StarterGui

Instead, have it in ServerStorage and have a script clone it into the Player when they join, like

game.Players.PlayerAdded:connect(function(p)
game.ServerStorage.YourGuiHere:Clone().Parent = p:WaitForChild("PlayerGui")
end)

woof woof

This discussion is preserved as it was. New answers, comments, and votes are closed.