Linking Multiple Guis

After looking through the Roblox API Manual as well as messing around in a new baseplate, I almost came to the conclusion that a connection between multiple screen guis isn’t possible but something isn’t adding up. Below is some code from the new baseplate with simple variables that (in theory) should work, yet even with the proper outputs, the player’s screen fails to reflect the outlined changes in code.

local StarterGui = game:GetService("StarterGui")

local Mary = StarterGui.Mary
local Frame = Mary.Frame

local Betty = script.Parent
local Button = Betty.button

local RS = game:GetService("ReplicatedStorage")
local seen = RS.RemoteEvent

Button.MouseButton1Click:Connect(function()
print("Hey I'm here!")
Frame.Visible = true
seen:FireServer()

end)

This is all written in a local script placed under either GUI, as previous tests with a local script directly inside the StarterGui folder proved unfruitful.

seen:FireServer()

was used in my attempts to use a remote event to bridge the gap, although it proved unnecessary. While both methods succeed in changing the Frame’s visible value to true, the frame itself does not show up.

What could be the reason for this? Thanks in advance!

StarterGui is a template, and not active during actual gameplay. You need to use Player.PlayerGui

local PlayerGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")

local Gui1 = PlayerGui.Gui1
local Gui2 = PlayerGui.gui2
1 Like

I forget that every time! Wow, so multiple gui connection is possible! Thanks!

You could use a BindableEvent/BindableFunction too, those facilitate communication between two local scripts.