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 keep a GUI removed?

Hellu, I created a RemoveButton script but whenever I reset anyway, it comes back, I was wondering if someone could help me with keeping it removed until they join back after leaving or something.

This is what the script looks like: (its a local script btw) (also it does work)

button = script.Parent
window = script.Parent.Parent.Parent

function onClicked(GUI)
	window:remove()
end

script.Parent.MouseButton1Click:connect(onClicked)

2 answers

Maybe try this:

local button = script.Parent
local window = script.Parent.Parent.Parent

function onClicked(GUI)
    window.Transparency = "1"
end

script.Parent.MouseButton1Click:connect(onClicked)

IDK if that will work...

What I will do is I will add bool value to starter pack. Name it "Testing". Script should be local script.

while wait() do
if game.Players.LocalPlayer.Testing.Value == true then --Checks Bool Value That Is Named Testing
window.Transparency = 1 --If Testing Is True (Enabled) Then It Will Make It Invisible.
else --If False
window.Transparency = 0 --Make Window Visible.
end
end

And make another local script:

function onClicked()
if game.Players.LocalPlayer.Testing.Value == true then
game.Players.LocalPlayer.Testing.Value = false
else
game.Players.LocalPlayer.Testing.Value = true
end
end

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