#HELP WITH GUI SCRIPT
1 messages · Page 1 of 1 (latest)
uhhhhhh
um
first why do you have a screen gui inside a screen gui
local ScreenGui = TextButton.Parent
local PlayerGui = ScreenGui.Parent
local NextScreenGui = PlayerGui:WaitForChild("") --name
TextButton.Activated:Connect(function()
ScreenGui.Enabled = false
NextScreenGui.Enabled = true
end)```
@restive steeple
i dont know
should i remove it ?
well the screen gui is not necessary but at the same time its fine
for excample what if i click the play in main screen and i want it to take me to the play screen
also can u step by step tell me what to do bc im new to gui and scripting
just make a LocalScript in the button that you want to change the gui and insert the code into the local script
the only thing you change is the NextScreenGui variable
inside WaitForChild("") put the name of the screen gui that you want the button to change to
so for excample i put the local script into the play button and make it when i click to take me to the Playscreen as in the pictures right ?
just check if the player pressed a GUI button then disable the current one and enable the new one
since you're apparently using ScreenGUI u can do ScreenGUI.Enabled and if it was a frame you could do Frame.Visible
noice