|
| 23 Oct 2008 03:17 PM |
Im making my own tycoon machine and im using this script for where the bricks on the conyaer belt will hit the dump
function onTouched(hit)
if hit.Name == "Sapphire" then Money.Value = Money.Value + 10 hit:remove() end
for some reson it doesnt work, why? please help |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:19 PM |
What is money? And you don't have a connection.
--Defining Money Money = script.Parent.Money
function onTouched(hit)
if hit.Name == "Sapphire" then Money.Value = Money.Value + 10 hit:remove() end end --You need an end for the if statement as well.
script.Parent.Touched:connect(onTouched) --This is the conneciton. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:22 PM |
| The Money isant the problem but the extra end and the listening I forgot so thankyou |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:22 PM |
| The money was a problem. You never defined it. |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:23 PM |
| Wait im wrong, it proberly is the money |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:26 PM |
| UGHHH, I did what you said but it still wont work |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Oct 2008 03:32 PM |
| Its a stat on the leaderboard |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 03:39 PM |
There is your problem.
Do you have an Owner value in the machine? |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 04:24 PM |
| Nope, I have one at the door to the factory tho |
|
|
| Report Abuse |
|
|
|
| 23 Oct 2008 04:30 PM |
| Ok. I will help you in a little bit. |
|
|
| Report Abuse |
|
|