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.
01 | function 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.Button 1 Down:connect( function () onButton 1 Down(mouse) end ) -- this is only a part of a script ignore this |
08 | end |
09 |
10 |
11 |
12 | bin.Selected:connect(onSelected) |
01 | function 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 |
08 | end ) |
09 |
10 | mouse.Button 1 Down:connect( function () onButton 1 Down(mouse) end ) -- this is only a part of a script ignore this |
11 | end |
12 |
13 |
14 |
15 | bin.Selected:connect(onSelected) |