So this script is a normal script inside a part with a click detector and a Selection box. What this script is supposed to do is when it senses you have your mouse hovering over it, it activates the Selection box and when you leave it turns visible into false. However, it doesn't work after updates, how do I fix this?
Script:
script.Parent.ClickDetector.MouseHoverEnter:connect(function() script.Parent.SelectionBox.Visible = true end) script.Parent.ClickDetector.MouseHoverEnter:connect(function() script.Parent.SelectionBox.Visible = false end)
You use
script.Parent.ClickDetector.MouseHoverEnter
Twice, It should be
script.Parent.ClickDetector.MouseHoverEnter:Connect(function() script.Parent.SelectionBox.Visible = true end) script.Parent.ClickDetector.MouseHoverLeave:Connect(function() script.Parent.SelectionBox.Visible = false end)
Also
:connect()
is deprecated for future scripts use
:Connect()