|
| 26 Sep 2012 01:48 PM |
How do you make a badge that when the person reaches a amount of KO's and they earn or get the badge? Please help!
-Grape |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2012 01:51 PM |
local KOamt = 100
game.Players.PlayerAdded:connect(function(p) wait(5) p.leaderstats.KOs.Changed:connect(function() if p.leaderstats.KOs.Value == KOamt then -- award the badge end end) end)
That SHOULD work. |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2012 01:53 PM |
| @ Agent, where do I post that? In the lighting? & do i put the badge their and delete the script thats in the badge and put this one in it? |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2012 01:54 PM |
Use an entirely new script under workspace. You're going to have to come up with the awarding the badge part yourself. I don't know how to award badges. :P
If you go to the wiki and search for BadgeService, then click on AwardBadge on the page, you should be able to find an explanation of how to award a badge. |
|
|
| Report Abuse |
|
|
| |
|
Daelus
|
  |
| Joined: 06 Sep 2012 |
| Total Posts: 144 |
|
|
| 26 Sep 2012 02:18 PM |
local KOamt = 100 local badgeID = 0
game.Players.PlayerAdded:connect(function(p) wait(5) p.leaderstats.KOs.Changed:connect(function() if p.leaderstats.KOs.Value == KOamt then game:GetService('BadgeService'):AwardBadge(player.userID, badgeID) end end) end) |
|
|
| Report Abuse |
|
|
| |
|
| |
|