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 » Club Houses » Let's Make a Deal
Home Search
 

Re: I need some help with this script

Previous Thread :: Next Thread 
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:14 AM
bump
Report Abuse
firestar509 is not online. firestar509
Joined: 04 Feb 2012
Total Posts: 5641
09 Jun 2013 02:14 AM
wrong forum

add precisely 59,485 to my post count - also, yes i am theone23
Report Abuse
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
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
firestar509 is not online. firestar509
Joined: 04 Feb 2012
Total Posts: 5641
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
rappingkillerb is not online. rappingkillerb
Joined: 17 Jun 2011
Total Posts: 15409
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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:17 AM
I just wish Play solo mode could implement leaderstats so I could fix this
Report Abuse
lamaawesome is not online. lamaawesome
Joined: 25 Feb 2011
Total Posts: 27423
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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:18 AM
@rapping

unless you want me to add 30 more 'if' functions
Report Abuse
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:19 AM
@lamm

the script isn't even that long, its not even 100 I think
Report Abuse
firestar509 is not online. firestar509
Joined: 04 Feb 2012
Total Posts: 5641
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
cloontroeper1 is not online. cloontroeper1
Joined: 14 Mar 2011
Total Posts: 4204
09 Jun 2013 02:20 AM
Maybe ik What it breaks. In a part of the script it says ('player') not ("player")
Report Abuse
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:21 AM
@cloon

thats verifying the service
Report Abuse
cloontroeper1 is not online. cloontroeper1
Joined: 14 Mar 2011
Total Posts: 4204
09 Jun 2013 02:23 AM
Oooh lol. And learn me scripting pl0x
Report Abuse
lamaawesome is not online. lamaawesome
Joined: 25 Feb 2011
Total Posts: 27423
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 is not online. Havemeat
Joined: 08 Jan 2008
Total Posts: 18081
09 Jun 2013 02:24 AM
Small error with the gamepass service line.
Report Abuse
Laxion is not online. 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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:31 AM
@Havemeat

should I try " not ' ?
Report Abuse
noah is not online. 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 is not online. Havemeat
Joined: 08 Jan 2008
Total Posts: 18081
09 Jun 2013 02:32 AM
That might work.
Report Abuse
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
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
neocobra68 is not online. neocobra68
Joined: 30 May 2009
Total Posts: 25428
09 Jun 2013 02:41 AM
facepalm

I added extra lines to over-verify the tag and the player service.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Club Houses » Let's Make a Deal
   
 
   
  • 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