|
| 02 Feb 2015 02:58 PM |
| I want to award a badge for people who killed me in game, and I presume it's a script. Does anyone know the script? |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:00 PM |
| You use BadgeService and AwardBadge, it takes player.userId & badgeId as arguments. |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:03 PM |
| Do you have an actual script wit instructions? |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:06 PM |
local badgeService = game:GetService('BadgeService') local BADGE_ID = 000
game.Players.PlayerAdded:connect(function(player) badgeService:AwardBadge(player.userId, BADGE_ID) end) |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:26 PM |
player.userId, BADGE_ID) Would I erase userId and put my id and erase BADGE_ID and put the badge id of the model? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
| |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Feb 2015 03:35 PM |
game.Players.PlayerAdded:connect(function(player) if (player.userId == game.CreatorId) then player.CharacterAdded:connect(function(character) character.Humanoid.Died:wait() if (character.Humanoid:FindFirstChild("creator") and character.Humanoid.creator.Value) then game:GetService("BadgeService"):AwardBadge(character.Humanoid.creator.Value, badgeId) end end) end end)
--[[Replace badgeId with the badges item ID]] |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:41 PM |
| And where would I put my player id? |
|
|
| Report Abuse |
|
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
| |
|
Astrain1
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 18697 |
|
|
| 02 Feb 2015 03:42 PM |
"And where would I put my player id?"
His script'll cover that for you.
jeb get me the seperatrons | go get hit by a speeding commuter train |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Feb 2015 03:43 PM |
You don't need to put your id in it
if (player.userId == game.CreatorId) then
It automatically checks the game creators ID |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Feb 2015 03:44 PM |
You do need to replace this line though game:GetService("BadgeService"):AwardBadge(character.Humanoid.creator.Value, badgeId)
with
game:GetService("BadgeService"):AwardBadge(character.Humanoid.creator.Value.userId, badgeId)
Because I forgot the .userId part And of course still need to replace badgeId with the badges item ID |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2015 03:46 PM |
So i'll have game.Players.PlayerAdded:connect(function(player) if (player.userId == game.CreatorId) then player.CharacterAdded:connect(function(character) character.Humanoid.Died:wait() if (character.Humanoid:FindFirstChild("creator") and character.Humanoid.creator.Value) then game:GetService("BadgeService"):AwardBadge(character.Humanoid.creator.Value.userId, badgeId) end end) end end)
--[[Replace badgeId with the badges item ID]]
BUT with my badge id it'll be
game.Players.PlayerAdded:connect(function(player) if (player.userId == game.CreatorId) then player.CharacterAdded:connect(function(character) character.Humanoid.Died:wait() if (character.Humanoid:FindFirstChild("creator") and character.Humanoid.creator.Value) then game:GetService("BadgeService"):AwardBadge(character.Humanoid.creator.Value.userId, 211399772) end end) end end)
--[[Replace badgeId with the badges item ID]] |
|
|
| Report Abuse |
|
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 02 Feb 2015 03:48 PM |
Yep should work
You can remove this too '--[[Replace badgeId with the badges item ID]]'
Its not gonna hurt anything its just a comment, leave it there if you want but you can take it off |
|
|
| Report Abuse |
|
|
| |
|