|
| 30 Aug 2011 12:32 PM |
local Humanoid = script.Parent.Zombie function PwntX_X() local tag = Humanoid:findFirstChild("creator") if tag ~= nil then if tag.Value ~= nil then local Leaderstats = tag.Value:findFirstChild("leaderstats") if Leaderstats ~= nil then Leaderstats.KOs.Value = Leaderstats.KOs.Value + 1 wait(0.1) script:remove() end end end end Humanoid.Died:connect(PwntX_X)
So yeah the zombie has a humanoid named Zombie... Now what?
Leaderboard Here:
print("LinkedLeaderboard script")
stands = {} CTF_mode = false
function onHumanoidDied(humanoid, player) local stats = player:findFirstChild("leaderstats") if stats ~= nil then local deaths = stats:findFirstChild("Wipeouts") deaths.Value = deaths.Value + 1
local killer = getKillerOfHumanoidIfStillInGame(humanoid)
handleKillCount(humanoid, player) end end
function onPlayerRespawn(property, player) if property == "Character" and player.Character ~= nil then local humanoid = player.Character.Humanoid local p = player local h = humanoid humanoid.Died:connect(function() onHumanoidDied(h, p) end ) end end
function getKillerOfHumanoidIfStillInGame(humanoid)
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then local killer = tag.Value if killer.Parent ~= nil then return killer end end
return nil end
function handleKillCount(humanoid, player) local killer = getKillerOfHumanoidIfStillInGame(humanoid) if killer ~= nil then local stats = killer:findFirstChild("leaderstats") if stats ~= nil then local kills = stats:findFirstChild("KOs") if killer ~= player then kills.Value = kills.Value + 0 else kills.Value = kills.Value - 0 end end end end
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 30 Aug 2011 12:52 PM |
It doesnt work becouse you made a mistake. Simple answer. |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 12:53 PM |
| Yes. I know but idk how to fix it... |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 12:53 PM |
http://www.roblox.com/Forum/ShowPost.aspx?PostID=9772680
And use the output. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Aug 2011 12:59 PM |
| Thats how i found a mistake. |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 01:33 PM |
| Next thing to do: Post here what the output said. |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Aug 2011 02:02 PM |
Zombie is not a valid member of Workspace... On line 1... BUT I HAVE A HUMANOID CALLED ZOMBIE |
|
|
| Report Abuse |
|
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
|
| 30 Aug 2011 02:02 PM |
local Leaderstats = tag.Value:findFirstChild("leaderstats") ? |
|
|
| Report Abuse |
|
|
|
| 30 Aug 2011 02:06 PM |
| I don't get it can you just help me edit it? anyways Im new -.- |
|
|
| Report Abuse |
|
|
| |
|
| |
|
bloob827
|
  |
| Joined: 01 Aug 2010 |
| Total Posts: 6867 |
|
|
| 30 Aug 2011 02:39 PM |
| You tried to find a value inside a value. |
|
|
| Report Abuse |
|
|
| |
|
| |
|