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

How do you get into a players PlayerGui?

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

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

3 comments

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

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

2

I fixed it. It was trying to print before it loaded it so i added a WaitForChild() and it works now

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