Mainixy
(47Arnd)
#1
Hi Roblox Community!
I want to overwrite the command from MouseHoverEnter with MouseClick
The problem is that when i do the mouse click command that the mousehoverenter is still activaded and the mouse click doesent work.
I tried it with this code:
script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
script.Parent.SelectionBox.Transparency = 0
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
script.Parent.SelectionBox.Transparency = 1
end)
script.Parent.ClickDetector.MouseClick:Connect(function()
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
script.Parent.SelectionBox.Transparency = 0
end)
end)
1 Like
Synitx
(Synitx)
#2
Code
script.Parent.ClickDetector.MouseHoverEnter:Connect(function()
script.Parent.SelectionBox.Transparency = 0
end)
script.Parent.ClickDetector.MouseHoverLeave:Connect(function()
script.Parent.SelectionBox.Transparency = 1
script.Parent.SelectionBox.Visible = true
end)
script.Parent.ClickDetector.MouseClick:Connect(function()
script.Parent.SelectionBox.Visible = false
end)
You can make it Visible false when its clicked and when hover leave you can make it visible again.
2 Likes
Synitx
(Synitx)
#5
Sorry the first one was wrong you can try the new one!
Mainixy
(47Arnd)
#6
The selecting box is away when i click the part but i can fix this.thx for this code!
1 Like