Why am i not able to see my selection box on the part that my mouse is hovering on?

script.Parent.Selected:connect(function(mouse)
	function move()
		if mouse.Target == nil then
			script.Parent.SelectionBox.Adornee = nil
		
		else
script.Parent.SelectionBox.Adornee = mouse.Target
		end
	
	end
	mouse.Move:connect(move)
end)

"Update" When i look in properties the adornee is on the selected part the selection box just wont show up

4 comments

0

note: if mouse.Target==nil and you're setting Adornee to mouse.Target, you would still be setting it to nil when it is nil without checking first. the condition is redundant.

1

Is this in a Tool?

0

yes its in a tool

0

when the