I made a visiting or thanks for joining badge that I made to be given to any new person that joins my game, but it only works sometimes.
I couldn't try anything, the badge gave it to 60 people when 146 people joined! All 146 people were supposed to get it!
This is the badge code:
local badgeID = 2124446943
local badgeService = game:GetService("BadgeService")
function onEntered(player)
wait(1)
if not badgeService:UserHasBadge(player.UserId, badgeID) then
badgeService:AwardBadge(player.UserId, badgeID)
end
end
game.Players.PlayerAdded:Connect(onEntered)
It was supposed to be given to all the people who visited. Because at some point they were all new!