So I have this script that awards players after staying in-game for 5 seconds. The script is supposed to award players another badge if they already have the previous badge, but I can't get it to work, any help is appreciated.
local badgeservice = game:GetService('BadgeService')
local id = 2124744629
local id2 = 2124814452
function OnPlayerEntered(plr)
wait(5)
if not badgeservice:UserHasBadgeAsync(plr.UserId, id) then
badgeservice:AwardBadge(plr.UserId, id)
if badgeservice:UserHasBadgeAsync(plr.IserId, id) then
badgeservice:AwardBadge(plr.UserId, id2)
end
end
wait(2)
plr:Kick("Congrats, you made it!")
end
game.Players.PlayerAdded:Connect(OnPlayerEntered)

2 comments
Hey i found this in your code try changing it to plr.UserId line 09, source
Thanks for spotting that but it still doesn't work :(