I have a problem, i want to give people with specific ranks in a group items, but i dont know how and i could not find anything on YT, so can someone tell me please how i can do it?
2 Likes
There’s a function in every Player called GetRankInGroup
that will return the value of the player’s role in the specified group (0 to 255). You’ll want to use this function in combination with PlayerAdded
, and if the player has the proper rank, you can give them the item.
local GROUP_ID=1234
local MINIMUM_RANK=100
function playerAdded(player)
if player:GetRankInGroup(GROUP_ID)>=MINIMUM_RANK then
--do stuff
end
end
game.Players.PlayerAdded:Connect(playerAdded)
5 Likes
thx! Im gonna try it tomorrow and see if it works.