Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a part that has a glowing selection part when you hover over it?

I want it to be like a MouseEnter type of thing then mouse leave

2 comments

0

Hi

0

lol

2 answers

✓ Accepted answer

You can put a ClickDetector in the part. Change the CursorIcon property in the ClickDetector invisible/transparent. Then put a script in the ClickDetector. Use the MouseHoverEnter:() function in your script. Then put a SelectionBox in your part, and make the transparency of the SelectionBox 1. Then, in the script make it so once MouseHoverEnter:(), SelectionBox.Transparency = 0. Lastly, in the script make it so once MouseHoverLeave:(), SelectionBox.Transparency =1.

Your script should look like this:

script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
	script.Parent.SelectionBox.Transparency = 0
end)

script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
	script.Parent.SelectionBox.Transparency = 1
end)

You can use the SelectionBox object. You can either add it through code or put it in and enable/disable it when needed.

Make sure to set the Adornee to the Model or Part that should be outlined, otherwise nothing will appear.

This discussion is preserved as it was. New answers, comments, and votes are closed.