|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 19 Sep 2015 |
| Total Posts: 1077 |
|
|
| 25 Sep 2015 07:57 AM |
| Does mow print or does it error |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 25 Sep 2015 04:44 PM |
wiki.roblox.com
Netflix and chill? I prefer Blockbuster and relax. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|