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

How do I make the GUI Disappear forever?

Hello, I made a Welcome GUI with a close button but if a character resets the GUI with the close button appear again is there any way I can make it Disappear even if the player dies?

1 comment

0

Destroy it

2 answers

You can destroy the gui e.g.

local Gui = game:GetService("StarterGui")

--//Whatever code you put
--//Now when you want to destroy it, write this code
Gui:Destroy()

I would use this put this as localscript inside the button that closes it

local event = game.ReplicatedStorage.RemoteEvent
script.Parent.MouseButton1Click:Connect(function()
      script.Parent.Parent.Visible = false
      event:FireServer()
end)

Put this in ServerScriptService as a script

local Name = game.StarterGui:FindFirstChild("GUINAME")
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function()
      Name:Destroy()
end

1 comment

0

You can rename your Remotevent to whatever you want

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