Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

mouse target or mouse hover?

Asked by 7 years ago

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)
0
Yes, thatd be the most efficient way to do the function. FazNook 61 — 7y
0
whats the difference preformance wise? deerdharok 91 — 7y
0
Its basically the same tbh. FazNook 61 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

Mouse.Hover is used when a mouse HOVERS a GUI(Any type). Mouse.Target is the object the mouse is pointing at. Thats the diference and if you don't use them correctly ur script will not work.

Ad

Answer this question