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: WHY DOESN'T THIS WORK?

Previous Thread :: Next Thread 
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
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
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:38 PM
Bump >.>
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:41 PM
BUMP SOMEONE HELP
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:48 PM
... Help ...
Report Abuse
theburnboss is not online. theburnboss
Joined: 06 Jun 2007
Total Posts: 1510
30 Aug 2011 12:52 PM
It doesnt work becouse you made a mistake.
Simple answer.
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:53 PM
Yes. I know but idk how to fix it...
Report Abuse
theburnboss is not online. theburnboss
Joined: 06 Jun 2007
Total Posts: 1510
30 Aug 2011 12:53 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=9772680

And use the output.
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:58 PM
I did.
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 12:59 PM
Thats how i found a mistake.
Report Abuse
theburnboss is not online. theburnboss
Joined: 06 Jun 2007
Total Posts: 1510
30 Aug 2011 01:33 PM
Next thing to do: Post here what the output said.
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 01:53 PM
Ok.
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
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 is not online. bloob827
Joined: 01 Aug 2010
Total Posts: 6867
30 Aug 2011 02:02 PM
local Leaderstats = tag.Value:findFirstChild("leaderstats")
?
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 02:06 PM
I don't get it can you just help me edit it? anyways Im new -.-
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 02:11 PM
at scripting...
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 02:18 PM
Bump.
Report Abuse
bloob827 is not online. 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
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 07:21 PM
On which line?
Report Abuse
Artixlol9999 is not online. Artixlol9999
Joined: 11 Sep 2010
Total Posts: 915
30 Aug 2011 07:25 PM
Bump.
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