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: Is this script wrong?

Previous Thread :: Next Thread 
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:09 AM
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.Money.Value = Leaderstats.Cash.Value + 10
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)

I put this in my zombie
and it doesn't work :/
And yes my leader board value is Cash
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 04:10 AM
Leaderstats.Money.Value = Leaderstats.Cash.Value + 10
Report Abuse
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:13 AM
Sorry but, forgot to mention that I do not know how to debug scripts :(
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 04:15 AM
Its pretty obvious.

You can do it.
Report Abuse
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:24 AM
Owh, cash and money
Ok ill try it
Report Abuse
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:31 AM
It still doesn't work,
Can you tell me?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 04:39 AM
local Humanoid = script.Parent.Zombie -- I think this is incorrect.
function PwntX_X()
local tag = Humanoid:findFirstChild("creator") -- This might also not be the case
if tag ~= nil then
if tag.Value ~= nil then -- how can it be nil?
local Leaderstats = tag.Value:findFirstChild("leaderstats") -- you are going to search in the tag?
if Leaderstats ~= nil then
Leaderstats.Cash.Value = Leaderstats.Cash.Value + 10 -- corrected to Cash
wait(0.1)
script:remove()
end
end
end
end
Humanoid.Died:connect(PwntX_X)
Report Abuse
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:43 AM
Yes zombie's name is zombie

So change tag to workspace

and what do you mean about the creator?
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 04:55 AM
When weapon kills someone they have to leave a mark in the humanoid called creator to show who killed him, that way you know who killed him.

Tag is really bad atm.
Report Abuse
centero is not online. centero
Joined: 17 Apr 2012
Total Posts: 35
08 May 2014 04:59 AM
You know what, forget it
If you are not going to help me fix it]
Then ill stop
Report Abuse
vlekje513 is not online. vlekje513
Joined: 28 Dec 2010
Total Posts: 9057
08 May 2014 05:05 AM
The problem is, I can help you fix it, I did so by telling you this.

But I can't fix it, since I do not have that information.
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