Hi! I am fairly new to scripting, and I was wondering about how to do something.
How do I make my group rank leaderboard, refresh it’s stats when a player respawns.
For Example: When you promote someone in a group and you respawn them and it will show their NEW rank on the leaderboard.
P.S: If you need more of an example of what I mean please message me.
For this you would use the .Died event of Humanoid, this event will fire whenever the Humanoid dies or in other words respawn, and have it so whenever it fires the group rank will update.
Also it is always best to include your attempt of doing this so we can help you fix it.
Thank you so much for your help!
No problem happy to help!
An even better way would be to connect on CharacterAdded (An event of the player object).
This event fires whenever the player spawns.
Hmm, never thought of that, I will try it! Thanks!
maybe this will help you.
local leaderstats = instance.new(“Model”)
leaderstats.name = “leaderstats”
leaderstats.Parent = player
local rank = instance.new(“StringValue”)
rank.Name = “Ranking”
rank.Value = game.Players.LocalPlayer:GetRoleInGroup(“Group Id”)
rank.Parent = leaderstats