yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 02 Dec 2014 04:09 PM |
tool = script.Parent halt = false
function onButton1Down(mouse) local hit = mouse.Target if (hit == nil) or (halt == true) then return end halt = true if (hit.Name == "Item") then hit:remove() mouse.Button1Down:connect(function() onButton1Down(mouse) end) end end |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
|
| 02 Dec 2014 04:15 PM |
| Think very carefully about where you are placing your ends. |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
|
| 02 Dec 2014 04:24 PM |
And end's sole purpose is to define the end of the scope.
Also, you need to connect or call the function from OUTSIDE of the scope. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 02 Dec 2014 04:27 PM |
That is some of the most nuclear code I've seen to date And yet somehow not the worst |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 02 Dec 2014 04:31 PM |
| How would I fix this though? |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 02 Dec 2014 04:34 PM |
--Changed to this.. still not working
tool = script.Parent halt = false
function onButton1Down(mouse) local hit = mouse.Target if (hit == nil) or (halt == true) then return end halt = true if (hit.Name == "Item") then hit:remove() end end
onButton1Down:connect(function(mouse) end) |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|