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: Might this work?

Previous Thread :: Next Thread 
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 07:46 PM
Player = script.Parent.Parent
local BadgeID = whatever you want it to be
if Player.leaderstats.KOs = 0 then
local a = game:GetService("BadgeService")
a:AwardBadge(player.userId,BadgeID)
end

---------
need feedback
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
09 Oct 2012 07:47 PM
no
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 07:48 PM
why not?
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
09 Oct 2012 07:50 PM
>local BadgeID = whatever you want it to be

>if Player.leaderstats.KOs = 0 then
And
You didn't capitalize the P in player.
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 07:55 PM
I got the "player" from the wiki >:o
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
09 Oct 2012 07:55 PM
badgeId = 000000

game.Player.PlayerAdded:connect(function(plyr)
local player = plyr
player:WaitForDataReady()
pcall(player:LoadInstance("leaderstats")
if player.leaderstats.KOs = 0 then
game.GetService("BadgeService"):AwardBadge(player.userId, badgeId)
end)
end)
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 07:56 PM
I'm not using that. It is to complicated for me.
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
09 Oct 2012 07:56 PM
Can no one get the == right today?
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
09 Oct 2012 07:56 PM
@Daelus, that will still error.
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
09 Oct 2012 07:57 PM
@mama, I can. :3
uMadBro?
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
09 Oct 2012 07:58 PM
>     game.Players.PlayerAdded:connect(function(plyr)
        local player = plyr

You don't need the second line of that.
Just edit the first line so it looks like this:

    game.Players.PlayerAdded:connect(function(player)
        player:WaitForDataReady()

I forgot to remove it.
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 07:59 PM
You know your not helping me learn.
Report Abuse
Daelus is not online. Daelus
Joined: 06 Sep 2012
Total Posts: 144
09 Oct 2012 07:59 PM
>     if player.leaderstats.KOs = 0 then

I also forgot to add a second "=".
That was a fail.

    if player.leaderstats.KOs == 0 then
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 08:00 PM
Btw PlayerAdded is not going to work for the script is in the StarterGui
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
09 Oct 2012 08:00 PM
It can still work, even if it's in the StarterGui.
Report Abuse
ninja5566 is not online. ninja5566
Joined: 14 Jan 2009
Total Posts: 5233
09 Oct 2012 08:03 PM
But i'm not learning from my mistake if you give me something to complicated v = i wtf is that?
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
09 Oct 2012 08:04 PM
v does not equal i, because they are different variables. Geez.
Unless i = 2 + 2 and v = 4.
Now we talking.
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