1
So, you want to script a badge? on 8/22/2010, 11:54 pm
Well, I have noticed a couple of Badge help threads, and I thought I might make a thread explaining BadgeService.
First, BadgeService is the service used to award badges. But BadgeService can do much more than that. In fact, using BadgeService, you can make a VIP shirts effects work without the person needing to wear the shirt!
Most basic kind of badge awarder script:
Simple. But you can mix that up a bit:
With that,a a player has a 50/50 chance of getting a badge when they enter. For those good scripters reading this, Im sure you can figure this out.
If you need more help, just reply!
First, BadgeService is the service used to award badges. But BadgeService can do much more than that. In fact, using BadgeService, you can make a VIP shirts effects work without the person needing to wear the shirt!
Most basic kind of badge awarder script:
- Code:
function Entered(player)
wait(0.3)--I always do this for some reason...
game:GetService("BadgeService"):AwardBadge(player.userId,1234322)
end
game.Players.PlayerAdded:connect(Entered)
Simple. But you can mix that up a bit:
- Code:
function Entered(player)
wait(0.3) --I always do this for some reason...[/color]
Rand = math.random(1,2)
if Rand == 1 then
game:GetService("BadgeService"):AwardBadge(player.userId,1234322)
end
end
game.Players.PlayerAdded:connect(Entered)
With that,a a player has a 50/50 chance of getting a badge when they enter. For those good scripters reading this, Im sure you can figure this out.
If you need more help, just reply!




