Constantly get the player's mouse position?

so, when i fire a event, with mouse.lookvector, it only does the mouse lookvector when it was fired, is there a way i can get the mouse position constantly?

1 Like

Use a loop or RunService? Unless you’re asking something else

1 Like

the script that needs it is a server script, would i have to fire a event constantly about the lookvector?

1 Like

Yeah, though I’m not sure if that would be very performant? Firing a lot of remote events doesn’t sound like a good idea but I don’t actually know the performance/network consequences. Try moving whatever you’re making to the clientside and only fire remote events when needed if you can!

Some posts I found so you can make an informed choice:
Firing a Remote Event rapidly? - Help and Feedback / Scripting Support - Developer Forum | Roblox
Can firing Remote Events to the Client too much cause Lag? - Help and Feedback / Scripting Support - Developer Forum | Roblox
Should you avoid excessive use of remote event/functions? - Help and Feedback / Scripting Support - Developer Forum | Roblox

1 Like