I want to have a customization button that closes the main menu frame and opens the customization frame. However, whenever I click on the text button, only the main menu disappears. This is the code I'm using.
local frame = script.Parent.Parent local camera = game.Workspace.CamPart local currentcamera = game.Workspace.CurrentCamera local customframe = game.StarterGui.CustomizationGUI.Options script.Parent.Activated:Connect(function() if frame.Visible == not false then customframe.Visible = not false frame.Visible = not true end end)
Try false
, not true
makes no sense idk how you managed that. Also it will not be in startergui yet playergui.
local player = game.Players.LocalPlayer --grab the player local frame = script.Parent.Parent --didn't see why you needed all of that camera stuff local camera = game.Workspace.CamPart local currentcamera = game.Workspace.CurrentCamera --lol local customframe = player.PlayerGui.CustomizationGUI.Options--It's in playergui! script.Parent.MouseButton1Click:Connect(function() --activated? if frame.Visible == true then --swapped customframe.Visible = true--swapped frame.Visible = false--swapped end end)
EDIT: Try MouseButton1Click instead of activated