|
| 09 Jun 2013 02:13 AM |
wait(1)
function onDeath() local zHuman = script.Parent:findFirstChild( "Zombie" ) if zHuman ~= nil then local tag = zHuman:findFirstChild( "creator" ) if tag ~= nil then if tag.Value ~= nil then local stats = tag.Value:findFirstChild("leaderstats") if stats ~= nil then if tag.Value.Character ~= nil then local PlayersService = Game:GetService('Players') local player1 = game.Players:findFirstChild(tag.Value) local player2 = player1.Character local player = PlayersService:GetPlayerFromCharacter(player2) local GamePassService = Game:GetService('GamePassService') if GamePassService:PlayerHasPass(player, 118449985) then stats.Money.Value = stats.Money.Value + math.random(15,30) else stats.Money.Value = stats.Money.Value + math.random(7,15) end end end end end end end
script.Parent.Humanoid.Died:connect(onDeath)
If you see what I'm attempting to do here I'm trying to make a gamepass that increases zombie cash flow but I'm having trouble getting the money to the leaderstats.
Where did I mess up? I tried running through output but play solo doesn't give you leaderstats.(Like in play mode, but they don't have studio mode in play mode) |
|
|
| Report Abuse |
|
|
| |
|
|
| 09 Jun 2013 02:14 AM |
wrong forum
add precisely 59,485 to my post count - also, yes i am theone23 |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:15 AM |
@firestar
do you really think there will be people in that forum at this time of day?
LMaDs active like day round tho |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:15 AM |
i'm just saying it's not wise to be asking these type of people who spend their entire life profiting pixels about scripts
add precisely 59,485 to my post count - also, yes i am theone23 |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:16 AM |
i think you need to put end 30 more times and it will solve it
[I'm glad I could help] |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:17 AM |
| I just wish Play solo mode could implement leaderstats so I could fix this |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:18 AM |
Hmm
You missed a booleander at line 630, and a cosing at line 483
~*LMaD T-shirt : http://www.roblox.com/Get-out-T-Shirt-item?id=116201124*~ |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:18 AM |
@rapping
unless you want me to add 30 more 'if' functions |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:19 AM |
@lamm
the script isn't even that long, its not even 100 I think |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:20 AM |
it's only 29 lines
add precisely 59,485 to my post count - also, yes i am theone23 |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:20 AM |
| Maybe ik What it breaks. In a part of the script it says ('player') not ("player") |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:21 AM |
@cloon
thats verifying the service |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:23 AM |
| Oooh lol. And learn me scripting pl0x |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:24 AM |
@Neo
Ask for cripting help in LMaD, expect smartalleck answers
~*LMaD T-shirt : http://www.roblox.com/Get-out-T-Shirt-item?id=116201124*~ |
|
|
| Report Abuse |
|
|
Havemeat
|
  |
| Joined: 08 Jan 2008 |
| Total Posts: 18081 |
|
|
| 09 Jun 2013 02:24 AM |
| Small error with the gamepass service line. |
|
|
| Report Abuse |
|
|
Laxion
|
  |
| Joined: 01 Apr 2013 |
| Total Posts: 2584 |
|
|
| 09 Jun 2013 02:26 AM |
| welp. wrong forum+no one except for have is going to go through that for you. post the chunk you thing may have errored |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:31 AM |
@Havemeat
should I try " not ' ? |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 09 Jun 2013 02:32 AM |
| where is the script located and wuts the output? |
|
|
| Report Abuse |
|
|
Havemeat
|
  |
| Joined: 08 Jan 2008 |
| Total Posts: 18081 |
|
| |
|
|
| 09 Jun 2013 02:36 AM |
@noah the output wont be correct because play solo test mode doesnt support leaderstats
and its located within a zombie, which is located within a model located in the workspace
(the zombies are in a model so I can break the joints when the round is over.) |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:40 AM |
OH WAIT I FOUND THE ERROR
script.Parent.Humanoid(I have to change to Zombie).Died:connect
wow, typo |
|
|
| Report Abuse |
|
|
|
| 09 Jun 2013 02:41 AM |
facepalm
I added extra lines to over-verify the tag and the player service. |
|
|
| Report Abuse |
|
|