I've made a few ScreenGui"s" and when you click on something the Gui will appear and it works in the studio but not In-Game
Here is my script :
local function click (player)
player.PlayerGui.ScreenGui.Frame.Visible = true
end
script.Parent.ClickDetector.mouseClick:connect(click)
Is there anything wrong with the script that makes it not appear in the game?
I'd be pleased if someone tells me what's wrong with the script.
I'll thank you in advance if you tell me.

1 comment
I gave you a code but I didn't see the question, xD. So, if your script is into something related to GUI's you have to use MouseButton1Click instead of ClickDetector cause this is for Parts. Also, you shouldn't use local funtion, just funtion. Last but not least, line 2 is completely wrong since you HAVE TO use script.Parent... if your script is into the GUI you're trying to code for.