Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Player owns gamepass but cant get role?

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

✓ Accepted answer

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

2 comments

0

Can you do the opposite though? Like if someone is a role in a group and they can get something in game?

This discussion is preserved as it was. New answers, comments, and votes are closed.