I'm trying to make a little panel that shows, your name, your picture, and your rank, but I can't get it to change. This is the script that I have but it won't work.
game.Players.PlayerAdded:Connect(function(player) script.Parent.Text = player:GetRoleInGroup(--group ID)
I have this in a LocalScript inside of the text label.
The PlayerAdded event can only be detected on the server, whereas you're using a local script which is run on the client. Since local scripts only run while the player is in the game, you don't need an event that waits for the player to join the game. You can edit your script to look like this:
local player = game:GetService("Players").LocalPlayer script.Parent.Text = player:GetRoleInGroup(--Group ID)
If you have any questions or problems with this answer, let me know. I'd be happy to clarify or fix it.
Hope this helps!