Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hopper Bin Problem?

Asked by 9 years ago

So i want the tool if you hover over the part name "HitBox" then it will get a selection box on it, but it does not work.

01function onSelected(mouse)
02    if mouse.Target.Name == "HitBox" then
03        local pow = Instance.new("SelectionBox", mouse.Target)
04        pow.Adornee = mouse.Target
05        pow.Name = "SelectionBox"
06    end
07    mouse.Button1Down:connect(function() onButton1Down(mouse) end) -- this is only a part of a script ignore this
08end
09 
10 
11 
12bin.Selected:connect(onSelected)

1 answer

Log in to vote
1
Answered by 9 years ago
01function onSelected(mouse)
02  mouse.Move:connect(function()
03    if mouse.Target.Name == "HitBox" then
04        local pow = Instance.new("SelectionBox", mouse.Target)
05        pow.Adornee = mouse.Target
06        pow.Name = "SelectionBox"
07    end
08end)
09 
10    mouse.Button1Down:connect(function() onButton1Down(mouse) end) -- this is only a part of a script ignore this
11end
12 
13 
14 
15bin.Selected:connect(onSelected)
Ad

Answer this question