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

How do you get into a players PlayerGui?

Asked by 9 years ago

I'm having trouble accessing a players PlayerGui. The answer to this is probably really simple but I just can't come up with anything.

If i use this code the script works:

game.Players.PlayerAdded:connect(function(player)
        print(player.PlayerGui.Name)

end)

but if i simply add the .Intro to it I get the error "Disconnected event because of exception" in the output?

so this script doesn't work

game.Players.PlayerAdded:connect(function(player)
        print(player.PlayerGui.Intro.Name)

end)

Can someone please tell me how to fix this?

1 answer

Log in to vote
-1
Answered by 9 years ago

Simple, if you put something into startergui, it'll be in Player's GUI as well.

1
I know but then you can't change the Text property of a textLabel. I mean you can but its not going to show up because its changing the one in the startGui instead of the PlayerGui austin10111213 28 — 9y
0
It'll still show up if you change it though. Edit in startergui, it'll be edited as well in PlayerGui. It's like a twin that feels your pain or changes GreekGodOfMLG 244 — 9y
2
I fixed it. It was trying to print before it loaded it so i added a WaitForChild() and it works now austin10111213 28 — 9y
Ad

Answer this question