I'm trying to make a game that gives you a badge every time a curtain amount of players are in the server. If you could please send me a script that detects that, I'll be able to take it from there. Thanks.
1 | local badgeservice = game:GetService( "BadgeService" ) |
2 | local badge = (numbers) |
3 | local player = game.Players.LocalPlayer |
4 |
5 | while true do |
6 | if game.Players:GetChildren = = 50 then |
7 | badgeservice:AwardBadge(player.UserID, badge) |
8 | end |
9 | end |
This is assuming you have already made the badge and stuff lol. Also this is a local script in starter player scripts.
1 | local players = game.Players:GetChildren() |
2 | local numOfPlayers = #players |