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

Player owns gamepass but cant get role?

Asked by 5 years ago

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:

game.Players.PlayerAdded:Connect(function(player)
    if game.MarketplaceService:PlayerOwnsAsset(player,7719771) then
        player:GetRoleInGroup
    end 
end)

I'm not sure if it is supposed to use the getroleingroup thing.

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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 **

0
Can you do the opposite though? Like if someone is a role in a group and they can get something in game? RowanStrohmYT 2 — 5y
0
Yes,https://developer.roblox.com/en-us/api-reference/function/Player/GetRoleInGroup royaltoe 5144 — 5y
Ad

Answer this question