Send data from client to server in real time

There’s definitely an easy way to do this that I’m just not smart enough to come up with on my own.

Basically, I want to have a value sent to the server that will be changing at a very fast rate (literally however many times your cursor’s position updates one second as you drag it across your screen).

I get the slight notion that firing a remote event every time RunService.RenderStepped fires isn’t exactly the best solution out there. Anyone got any ideas?

1 Like

I took a look around the forum and was able to find this:

This isn’t super relevant but it contains some useful information:


Basically, the takeaway is that the limit is about 50kbps. I would also use mouse.Move instead of on .RenderStep as if the mouse is idled, the .Move event doesn’t fire (which would be useful in your situation as I am sure you’re looking to fire it as little as possible).

If you’re using a basepart, you can also just give network ownership to the client.

1 Like

Take a step back and explain what your overall goal here is. Handling raw inputs on the server is an extremely bad idea for reasons you probably already know. Answer these questions real quick if you would.

Does it need to be on the server?
Can you send an update once per second instead and interpolate the results? If not, why does it need to be so precise and so frequent?

This honestly seems to me like a misallocation of client-server workload.

1 Like

if i give network ownership to the client will i be able to change the part’s cframe from the client and it will be replicated on the server?

I completely agree with this, depending on your implementation you can always just send mouse positions every half a second or so and just lerp it

Yes, that is what network ownership does.

NetworkOwnership only controls part physics, for different players to calculate it based on their magnitude from the part

Oh cool, I thought it just moved the whole computational workload of part physics to one client. Didn’t know you could do that. Thanks!

1 Like