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 » Scripting Helpers
Home Search
 

Re: KO badge script (Someone Help me!)

Previous Thread :: Next Thread 
Sinistergrape is not online. Sinistergrape
Joined: 12 Jan 2011
Total Posts: 3808
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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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
Sinistergrape is not online. Sinistergrape
Joined: 12 Jan 2011
Total Posts: 3808
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
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
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
Sinistergrape is not online. Sinistergrape
Joined: 12 Jan 2011
Total Posts: 3808
26 Sep 2012 01:57 PM
Thanks!
Report Abuse
Daelus is not online. 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
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
26 Sep 2012 03:40 PM
@AFF & Daelus;

>= not ==
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
26 Sep 2012 03:40 PM
^Nevermind...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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