#Does anyone know how to make it to were you have to be a certain rank in a group to buy something?
12 messages · Page 1 of 1 (latest)
In any case, I don't believe you can prevent players from buying a Marketplace asset, @unique delta
There isn't much of a point to doing this if I can find the asset on the website
player:GetRankInGroup()
and marketplaceservice:PromptPurchase()
for example:
(also keep in mind i have never done anything with ugc)
--this should be client
local player = game.Players.LocalPlayer
local mps = game:GetService("MarketplaceService")
local ugcid = 1
local groupdata = {
MinRank = 1,
MaxRank = 2,
GroupId = 1,
}
local rank = player:GetRankInGroup(groupdata.GroupId)
if rank >= groupdata.MinRank and rank <= groupdata.MaxRank and not mps:PlayerOwnsAsset(player, ucgid) then
mps:PromptPurchase(player, ugcid)
end
** You are now Level 3! **
but if you want to check if player joins group when in-game u would need to constantly run this and maybe also add a check if player doesnt own one already