|
| 08 Jul 2014 04:02 PM |
How would I make it so when a player with a certain gamepass kills a zombie they get more points than a player without it would? I can't seem to figure out how to implement it into this script:
local Humanoid = script.Parent.Zombie function onKill() 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.Money.Value + 1 --Change Money to the stat that is increased. wait(0.1) script:remove() end end end end Humanoid.Died:connect(onKill) |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 06:21 AM |
| Bump. I need help as soon as possible please. |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 09 Jul 2014 06:25 AM |
im not going to tell you WHERE to put this
money = 1 --base money with no gamepass if game:GetService("GamePassService"):PlayerHasPass(tag.Value, passId) then money = 10 --money WITH gamepass end
Leaderstats.Money.Value = Leaderstats.Money.Value + money |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2014 02:44 PM |
| Thanks man, I know exactly what to do. When I tried coding it I was putting 'tag' instead of 'tag.Value'. Thanks for your help! |
|
|
| Report Abuse |
|
|