Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why won't my customization GUI become visible?

Asked by 5 years ago

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)
0
OK i have edited my answer should work now. WideSteal321 773 — 5y
0
. WideSteal321 773 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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

0
That doesn't work. It does absolutely nothing User#25920 0 — 5y
0
What? Have you used it? WideSteal321 773 — 5y
0
Is it a Local Script? WideSteal321 773 — 5y
0
Its a local script, I published and tested User#25920 0 — 5y
View all comments (2 more)
0
Hmm WideSteal321 773 — 5y
0
OK, edited it. WideSteal321 773 — 5y
Ad

Answer this question