gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
|
| 23 Dec 2015 01:54 PM |
I am new at making badges so i don't understand much of it I wanted to make a badge that players can get if they get 10 kills, 100, etc Can anyone help me? |
|
|
| Report Abuse |
|
|
|
| 23 Dec 2015 02:03 PM |
http://wiki.roblox.com/index.php?title=API:Class/BadgeService
Every time the player kills, check if they have 10 kills. If they do, check if they have the badge using this:
game:GetService("BadgeService"):UserHasBadge(USER_ID, BADGE_ID)
If they don't, use this:
game:GetService("BadgeService"):AwardBarge(USER_ID, BADGE_ID) |
|
|
| Report Abuse |
|
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
| |
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
|
| 23 Dec 2015 02:36 PM |
I'm still having a trouble to make it work Can you send me the whole script? |
|
|
| Report Abuse |
|
|
Zztheses
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 94 |
|
|
| 23 Dec 2015 02:45 PM |
I know it has something to do with getting the Players leaderstats and has something like
local badgeid = 0
for _, player in pairs (game.Players:GetChildren()) do if player then local leaderstats = player:WaitForChild('leaderstats') local kills = leaderstats:WaitForChild('Kills') if leaderstats and kills.Value <= 10 then player:AwardBadge(player.userId, badgeid) end end end
Not to sure though. |
|
|
| Report Abuse |
|
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
|
| 23 Dec 2015 03:44 PM |
| It's still not working for me |
|
|
| Report Abuse |
|
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
| |
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
| |
|
Zztheses
|
  |
| Joined: 29 Jun 2013 |
| Total Posts: 94 |
|
| |
|
gusttalon
|
  |
| Joined: 17 Jul 2013 |
| Total Posts: 379 |
|
|
| 23 Dec 2015 06:21 PM |
| I already removed the badge so I would have to pay another 100 robux to buy another lol, so I gave up :] |
|
|
| Report Abuse |
|
|