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

How to make a gui that displays your rank in a group (Screen Gui)?

How would i make a script that displays your role in a group in a screen gui, the code i have doesnt work.


function onPlayerRespawned(newPlayer)
script.Parent.Text = newPlayer:GetRoleInGroup(3569513)
end
game.Players.PlayerAdded:connect(onPlayerRespawned) 

1 answer

✓ Accepted answer

Is it in a text label? Provided it is, you just need a local script within the text label, with much simpler script.

script.Parent.Text = game.Players.LocalPlayer:GetRoleInGroup(3569513)

PlayerGUI regenerates each time you respawn, so it will change the text on each respawn.

The PlayerAdded system you had is a server-side function, so it would be useless, anyhow.

Hope this helped!

Thanks,

Explosion

1 comment

0

Ok i don't quite understand server-side functions completely but this helped.

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