Will firing the server after each wait() function cause lag?

I want to send the player’s mouse position to the server from local script after every wait(). However, I am concerned that this will cause massive lag due to the excessive amounts of times the server is fired in one second. Is this assumption wrong, and it won’t cause any lag, or is this a problem?

Here is my code:

while shooting do
	input:FireServer(mouse.Hit)
	wait()
end

If it does cause lag, what alternatives are there for my objective?

mouse.Move:Connect(function()
   input:FireServer(mouse.Hit)
end)
1 Like

How did I not think of that. Thank you for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.