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 » Scripters
Home Search
 

Re: LINES OF CODE

Previous Thread :: Next Thread 
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 07:41 AM
Alright, sorry for posting so many threads but, I have found that these lines of code do not work properly. The extra ends are meant to be there, it is part of a bigger script.

if stats ~= nil then --If moneyholder exists then
print("Cat")
local cash = stats:findFirstChild("Candy") --Get money
print("Dog")
cash.Value = cash.Value + 3
print("Mow")
wait(0.3) --wait-time before button works again
print("Wof")
end

end

ting = 0 --remove debounce
end

end

Again, thanks.

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
Stymi is not online. Stymi
Joined: 19 Sep 2015
Total Posts: 1077
25 Sep 2015 07:43 AM
"I have found that these lines of code do not work properly. "

you didn't say what prints
you didn't describe the problem
you didn't paste output or say that there isnt any
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 07:45 AM
ops, sorry.

What the problem is,
the first two lines work

if stats ~= nil then --If moneyholder exists then
print("Cat")
local cash = stats:findFirstChild("Candy") --Get money
print("Dog")

but as soon as it gets to the cash.Value it does not function properly.
With that one line not being able to work, the rest of the function won't either.

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
Stymi is not online. Stymi
Joined: 19 Sep 2015
Total Posts: 1077
25 Sep 2015 07:57 AM
Does mow print or does it error
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 08:03 AM
Mow doesn't print, there's also no error. I have no idea what's going on with my script.

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
25 Sep 2015 09:08 AM
you said cash.Value not works will that say "Dog" is printed?

if so then the variable cash is nil and child "Candy" of stats is not existing.
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 04:09 PM
How would I fix that?

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 04:13 PM
bump

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 04:24 PM
man, the forums are busy today!

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 04:36 PM
bump

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 04:43 PM
bump

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
25 Sep 2015 04:44 PM
wiki.roblox.com


Netflix and chill? I prefer Blockbuster and relax.
Report Abuse
SkepticLemon is not online. SkepticLemon
Joined: 14 Oct 2009
Total Posts: 2817
25 Sep 2015 05:06 PM
Found an error

Workspace.Halloween kit.Clickswitch.Script:27: attempt to index local 'cash' (a nil value)

there's a nil value, as you can see. How would I fix this?

R u Srs?Join the hype for Halloween. http://www.roblox.com/games/153275706/Unofficial-Trick-or-treat-2015-OPEN-BETA#!/about
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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