I have been trying to figure this out for a while, so far I have been using the following code I found on creating gui buttons:

local button = script.Parent local toggled = false

local function onButtonActivated()
	if toggled == false then
		button.Image = "rbxgameasset://Images/off"
		toggled = true
	else		
		button.Image = "rbxgameasset://Images/on"
		toggled = false
	end
end
 
button.Activated:Connect(onButtonActivated)

but I don't know how to make it remove the starting gui I have set up, so how do I do that?

edit: im also using a code that removes the top bar (the area where the chat and backpack is) to add more space for the gui, I also need to have it add that one back when pressed

3 comments

0

Could you elaborate on what you mean by "starting gui?" Are you referring only to built-in default UI?

0

Do you mean the StarterGUI (built-in) or your own personal Starting GUI (user-made)?

0

one i made, pretty much just a full screen image and some text