Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I need help with a player GUI Error, saying Main is not part of PlayerGui?

Asked by 5 years ago

Saying: Main is not a valid member of PlayerGui

http://prntscr.com/l4i4v3

0
Are you sure that Main is a parent of PlayerGui? KrzysiekRoblox 50 — 5y

1 answer

Log in to vote
0
Answered by
angeI1001 123
5 years ago

If this is in a localscript, doing that won't affect the other players, you need to use a remote event (:FireAllClients) in order to do that.

If it's a serverscript, playergui is not visible for the server.

0
Also, use WaitForChild on PlayerGui as it might be nil. angeI1001 123 — 5y
0
So how can I access the playerGui to change something inside it? ForeverTix -2 — 5y
0
You need to use a remoteevent. angeI1001 123 — 5y
0
How do I do that? I want to access main, http://prntscr.com/l4i8y1 ForeverTix -2 — 5y
View all comments (9 more)
0
You simply google "roblox remoteevent", the method is :FireAllClients(). angeI1001 123 — 5y
0
How would I write it into code so I could access the text? ForeverTix -2 — 5y
0
The wiki will tell you everything you need to know. angeI1001 123 — 5y
0
I can't find the page, may I have the link/ ForeverTix -2 — 5y
0
Thank you but this still doesn't help me with my problem. I want to access a GUI part from the Player, but it gives me an error message of the part I'm trying to access is not there when the GUI is. ForeverTix -2 — 5y
0
Use WaitForChild on the object you're accessing to make sure it's there. angeI1001 123 — 5y
0
It still says it's not a valid member when I do v.StarterGui.Main:WaitForChild() ForeverTix -2 — 5y
0
Oh.. my get players function might be wrong http://prntscr.com/l4ihst ForeverTix -2 — 5y
Ad

Answer this question