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

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

Asked by
Galicate 106
6 years ago

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

Log in to vote
0
Answered by 6 years ago

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

0
Ok i don't quite understand server-side functions completely but this helped. Galicate 106 — 6y
Ad

Answer this question