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.
function onSelected(mouse) if mouse.Target.Name == "HitBox" then local pow = Instance.new("SelectionBox", mouse.Target) pow.Adornee = mouse.Target pow.Name = "SelectionBox" end mouse.Button1Down:connect(function() onButton1Down(mouse) end) -- this is only a part of a script ignore this end bin.Selected:connect(onSelected)
function onSelected(mouse) mouse.Move:connect(function() if mouse.Target.Name == "HitBox" then local pow = Instance.new("SelectionBox", mouse.Target) pow.Adornee = mouse.Target pow.Name = "SelectionBox" end end) mouse.Button1Down:connect(function() onButton1Down(mouse) end) -- this is only a part of a script ignore this end bin.Selected:connect(onSelected)