Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

PlayerGUI is not a valid member of player. Any way to fix this issue?

I am having trouble making a brick that when you click on it. Opens up a gui. But for some reason. When I try to put in the code which is.

local function click(playerr)
playerr.PlayerGUI.ScreenGUI.Frame.Visible = true

end
script.Parent.Notecheck.MouseClick:Connect(click)

And I keep getting this error PlayerGUI is not a valid member of Player

Is there anything that can fix this issue?

1 answer

Thats because PlayerGUI is named PlayerGui, roblox is case sensitive

	playerr.PlayerGui.ScreenGui.Frame.Visible = true

and i am pretty sure you didnt rename the ScreenGui object to ScreenGUI, so i corrected that for you too

7 comments

0

Thank you very much. It actually works now. Thanks for your help.

0

nice, please accept the answer then

0

I wonder if lots of answers go unaccepted on this site because new users do not know how to accept answers?

0

Because it's scummy to remind users

0

How so? I put in effort and take some time to help people out with their problems, the least they can do is accept the answer, how is that even remotely scummy? I dont get your logic here tbh

0

I saw your post on the forum about accepting answers, please re-read this statement said by the moderator "Users are supposed to accept an answer if it helped solve their problem, but a lot of them today won't, hence the need for a reminder."

0

@incapaz I already talked to you about this lol

This discussion is preserved as it was. New answers, comments, and votes are closed.