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
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
| |
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
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
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 09 Oct 2012 07:55 PM |
| I got the "player" from the wiki >:o |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 09 Oct 2012 07:56 PM |
| Can no one get the == right today? |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 07:56 PM |
| @Daelus, that will still error. |
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 09 Oct 2012 07:59 PM |
| You know your not helping me learn. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|
|
| 09 Oct 2012 08:00 PM |
| It can still work, even if it's in the StarterGui. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|