I want to make it so when a player owns a gamepass then they get a badge and the gamepass id is (27455846) and the badge id is (2125977058)
✓ ANSWER ACCEPTED
How to make a player get a badge when they get a gamepass?
2 answers
✓ Accepted answer
Use game.Players.Playeradded and do a check if the player possesses the gamepass. If they do then use Badgeservice to award them the badge. If ur still confused il elaborate more An example can be that
local BadgeService = game:GetService("BadgeService")
local MarketService = game:GetService("MarketPlaceService")
game.Players.PlayerAdded:Connect(function(plr)
local Possesessgamepass = MarketService:UserOwnsGamePassAsync(plr.UserId, insert ur game pass id here)
if Possesessgamepass == true then
BadgeSerivce:AwardBadge(plr.UserId, badge you want to award id)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
