generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to make a badge for 10 kills etc... ?

Previous Thread :: Next Thread 
gusttalon is not online. 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
wonderful72pike is online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
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 is not online. gusttalon
Joined: 17 Jul 2013
Total Posts: 379
23 Dec 2015 02:08 PM
Thank you! I'll try it
Report Abuse
gusttalon is not online. 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 is not online. 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 is not online. gusttalon
Joined: 17 Jul 2013
Total Posts: 379
23 Dec 2015 03:44 PM
It's still not working for me
Report Abuse
gusttalon is not online. gusttalon
Joined: 17 Jul 2013
Total Posts: 379
23 Dec 2015 03:55 PM
Anyone can help? please?
Report Abuse
gusttalon is not online. gusttalon
Joined: 17 Jul 2013
Total Posts: 379
23 Dec 2015 05:39 PM
Nevermind, i give up.
Report Abuse
Zztheses is not online. Zztheses
Joined: 29 Jun 2013
Total Posts: 94
23 Dec 2015 05:58 PM
Never give up.
Report Abuse
gusttalon is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image