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
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 08 May 2014 04:10 AM |
| Leaderstats.Money.Value = Leaderstats.Cash.Value + 10 |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 08 May 2014 04:15 AM |
Its pretty obvious.
You can do it. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|