K so bassicly I tried to make a script where when a player buys a gamepass then they get a rank in the roblox group.
I had my script like this:
1 | game.Players.PlayerAdded:Connect( function (player) |
2 | if game.MarketplaceService:PlayerOwnsAsset(player, 7719771 ) then |
3 | player:GetRoleInGroup |
4 | end |
5 | end ) |
I'm not sure if it is supposed to use the getroleingroup thing.
Sadly, Roblox doesn't allow ranking from scripts. You are not able to rank someone throu a script, either program a bot (outside roblox studio) to do it (Which is hard) else make it when someone buys the gamepass, it sends you a message for example on discord channel and you rank them manually.
And to correct your script, (GetRoleInGroup) is a function to return the role of the player in a specefic group.
**I hope what I said was correct and it helps in the future, if you have further questions add me on Discord! I'm sorry.#2018 **