I am a dev for a security group, and need help with making group ranks connected to in-game ranks.
https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup
This gets the rank number based on group ID and player
https://developer.roblox.com/en-us/api-reference/function/Player/GetRoleInGroup
This returns the name of a rank based on group ID and player
Thanks, but it is giving me an “Unable to cast string to int64”.
The script is:
game.Players.PlayerAdded:Connect(function(player)
print(“Player is a” … player:GetRoleInGroup “in the group!”)
end)
local GroupId = 0000000; -- Put your group id here
game.Players.PlayerAdded:Connect(function(Player)
print(Player.Name .. (Player:IsInGroup(GroupId) and " is in group" or " is not in group"))
print(Player.Name .. "'s rank is " .. Player:GetRoleInGroup(GroupId))
end)
the issue is you never pass group id, and instead try passing a string.
2 Likes
Alright, thank you! That helped a lot with development.
No problem, good luck with development and best of luck with any future en-devours.
1 Like