Hi,
I'm working on a game where the user clicks on certain objects, modals appear. I have it working when, in Roblox Studio, I choose "Play" or "Play Here". However, when I choose to "Start" a "Local Server", the modals do not appear when clicking on those objects.
Here's the code I am using to make a modal appear:
function onClicked(player) player.PlayerGui.GameConsoleGui.WelcomeModal.Enabled = true end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
The modals are ScreenGui objects that have "Enabled" set to false by default, and only have "Enabled" set to true by scripts.
Appreciate any help with this.

1 comment
The server cannot access PlayerGui. Also it's Connect not connect.