is it better to raplace this code with "MouseHoverEnter" and "MouseHoverLeave"?
playersmouse.Move:connect(function()
local target= playersmouse.Target
local ppost=part1.Position
local part2= game.Players.LocalPlayer.Character:WaitForChild("Torso").Position
local magnitudes =(ppost-part2).magnitude
if (target) then
if(target==part1)then
if(magnitudes<10)then
mouseover.Visible=true
else
mouseover.Visible=false
end
else
mouseover.Visible=false
end
end
end)

3 comments
Yes, thatd be the most efficient way to do the function.
whats the difference preformance wise?
Its basically the same tbh.