doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 27 Feb 2013 06:39 PM |
The mouse works if I have a hopper bin or not. How do I change this to only work when the hopperbin is currently selected?
local mouse = Game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:connect(function() if mouse.Target then vari = mouse.Target:findFirstChild("Fuel") if vari then print(Fuel.Value) end end end) |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2013 06:41 PM |
use the mouse from the hopperbin's .selected event. it should stop when the hopperbin is deselected.
hopperbin.Selected:connect(function(mouse) --. end) |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 27 Feb 2013 06:48 PM |
This is the new script I got. Now it doesn't work. Output is empty.
local mouse = Game.Players.LocalPlayer:GetMouse()
hopperbin.Selected:connect(function(mouse) if mouse.Target then vari = mouse.Target:findFirstChild("Fuel") if vari then print(Fuel.Value) end end end) |
|
|
| Report Abuse |
|
|