Hello.
I've found a few errors in your script, So I decided to help you,
The Keyword: "Parent", Must start with Capitalized P (Line 2)
You forgot to add the () Symbols after Print Keyword, Similar with Line 1. (Line 3)
You got the "Connect" 2 Times, Just Erase the last line.
- If I got something wrong, Please tell me what is the wrong because it's important.
Here's the Script:
print("Hello world!")
script.Parent.MouseClick:Connect(function()
print("hi")
game.LocalPlayer.PlayerGui.Frame.Visible = true
end
end)
It may have an Error, Because it doesn't detect if it's visible or not.
Or maybe I got it wrong...
So...
If you want the Close and Open Script, Which will work, I brought you one.
print("Hello world!")
script.Parent.MouseClick:Connect(function()
print("hi")
if game.StarterGUI.ScreenGUI.Frame.Visible == false then
game.StarterGUI.ScreenGUI.Frame.Visible = true
else
game.StarterGUI.ScreenGUI.Frame.Visible = false
end
end)
2 comments
hey, im not sure what youre having trouble on:
the second line or the sixth line?