Note: I'm a big noob at scripting so don't give me a complicated answer. Thanks :P
So I've made a script inside a TextButton, which, upon pressing, closes the GUI on screen. Now, that code works, but I decided to add to it by making it open a different GUI when closed. I'm pretty sure I know how to script it, but ofc, my stuff in StarterGui isn't part of Workspace. How do I find things out of Workspace? Here is my failed attempt:
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Visible = false
wait (1)
local found = StarterGui:FindFirstChild("ChatGuiOne")
if found then
found.Frame.Visible = true
end
end)
Here is roughly how my StarterGui in the Explorer looks like:
StarterGui
ChatGuiOne
Frame
ChatGuiTwo
Frame
TextButton
LocalScript <-- This is the script
So when ChatGuiTwo is closed, I want ChatGuiOne to open. In my script, where it says StarterGui, there is a blue line underneath.
Hopefully, that was enough detail for someone to help me XD

2 comments
game.StarterGui
This has been solved already, no need to post an answer. Big shout out to OfcPedroo for helping me out! :D