So, I tested my hide and seek game with 3 of my alts. And one of them was the seeker, and the other 2 were hiders. I made a x2 Coins gamepass. One of the hiders owned the gamepass, and the other hider doesn't. Here is the line:
for i, contestant in pairs(contestants) do contestant.leaderstats.Wins.Value = contestant.leaderstats.Wins.Value + 1 if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(contestant.UserId, GamepassId) then contestant.leaderstats.Coins.Value = contestant.leaderstats.Coins.Value + 40 else contestant.leaderstats.Coins.Value = contestant.leaderstats.Coins.Value + 20 end end
But when I test the game, both of the hiders earn 20 coins, when one hider is supposed to earn 40 and the other should earn 20. I could really use some help
I think whats wrong is the line
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(contestant.UserId, GamepassId) then
Try replacing that with the line
local market = game:GetService("MarketPlaceService") if market:UserOwnsGamePassAsync(contestant.UserId, GamepassId) then