#Can anyone help me with making a button in one gui go to another gui?

14 messages · Page 1 of 1 (latest)

tropic osprey
#

so far i have this

#

local CasesScreenGui game.Players.LocalPlayer.PlayerGui:WaitForChild("CasesScreenGui")
local OpenCases = script.Parent.OpenCases

OpenCases.MouseButton1Click:Connect(function()
CasesScreenGui.Enabled = true
end)

#

im trying to make it so when i would click OpenCases It would take me to CasesScreenGui

deep maple
#

script.Parent.TextButton i think you intended script.Parent.OpenCases?

tropic osprey
#

yeah i saw it changed it nothing still happens

#

can it be something with the DisplayOrder? One of them is set to 1 the other to 0

#

nvm chat gpt did the job...

#

-- Variables
local openCasesButton = script.Parent:WaitForChild("OpenCases") -- The OpenCases button
local mainScreenGui = script.Parent -- The MainScreenGui
local casesScreenGui = mainScreenGui.Parent:WaitForChild("CasesScreenGui") -- The CasesScreenGui

-- Function to switch to CasesScreenGui
openCasesButton.MouseButton1Click:Connect(function()
-- Hide MainScreenGui
mainScreenGui.Enabled = false

-- Show CasesScreenGui
casesScreenGui.Enabled = true

end)

crude stump
#

there were errors earlier

tropic osprey
#

where?

grand fjordBOT
#

studio** You are now Level 1! **studio

crude stump
#

earlier before u asked chatgpt

#

in the output

#

were there any errors?