So I have a script inside a click detector, and when it's clicked it is supposed to make a certain ScreenGUI visible. There were no output errors when I tested it, so I'm not sure what's wrong with it. Can anyone help?
local clickDetector = script.Parent local function onMouseClick(player) script.Parent.Parent.Parent.Parent.Parent.StarterGui.Quests.QuestFrame.Visible = true end clickDetector.MouseClick:connect(onMouseClick)
When a player is added, the contents of StarterGui gets copied to that player's PlayerGui. Also, you should use the parameter of the onMouseClick()
function in order to access that player's PlayerGui.
local clickDetector = script.Parent local function onMouseClick(player) player.PlayerGui.Quests.QuestFrame.Visible = true end clickDetector.MouseClick:connect(onMouseClick)
Hope this helped.