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

Fire event every time mouse moves?

Asked by 5 years ago

I made a gun but after you hold mouse button 1, it keeps firing at only one static point (does not follow mouse), i wanted to know how tndicate to server that player is moving mouse in order to update the mouse hit pos instead of using while true do and infinitely spam the remote event for preventing lag.

1
There's a property in humanoid "TargetPoint" which represents the 3D position of player's target. That's a very simple way to track that and it doesn't require any remote events/functions. However it has some latency so it's not as perfect. memguy 161 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

the event mouse.Move works. (ps. u dont need to infinitely spam the remoteEvent, u only need to while the player is firing but i can understand that is a trash way to do it)

Ad

Answer this question