#Can anyone help me with making a button in one gui go to another gui?
14 messages · Page 1 of 1 (latest)
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
script.Parent.TextButton i think you intended script.Parent.OpenCases?
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)
there were errors earlier
where?
** You are now Level 1! **