SelectionBox not appearing

I’m trying to achieve this effect where If I were to hover the torso of this rig, the selection box property appears and when your mouse leaves it disappears.
image

heres my code for it

local Rig = workspace:WaitForChild("Rig");
local Torso = Rig:WaitForChild("Torso");
local SelectionBox = Torso:WaitForChild("SelectionBox");

Torso.MouseHoverEnter:Connect(function(player)
	
	SelectionBox.Visible = true
end)

Torso.MouseHoverLeave:Connect(function(player)
	SelectionBox.Visible = false
end)

What do i change to get this working?

make it Torso.ClickDetector.MouseHover bla bla

Already tried it a few before i created this topic didn’t work

does it give any error?
aaaaaaaaa

i tried it in a script inside clickdetector and it worked

local rig = workspace:WaitForChild(“Dummy”)
local torso = rig:WaitForChild(“Torso”)
local slcbox = torso:WaitForChild(“SelectionBox”)

torso.ClickDetector.MouseHoverEnter:Connect(function(plr)
slcbox.Visible = true
end)

make sure the rig is an R6

Still not working for some reason,
image
is this how your is formatted?

this is using MouseHoverEnter and MouseHoverLeave on the torso instead of the click detector

a script instead of localscript

ahh don’t know how I didn’t catch that thank you

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.