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

Sending large amounts of data from client in FE?

Asked by 7 years ago

I am making a flying script that moves the player from the current position to the mouse. With FilteringEnabled on, I am using a system involving RemoteFunctions that sends the local mouse.hit.p data to the server every frame so that the server can move the character towards that point.

The problem is, I am worried that by sending the local data from the client to the server every frame, I will go over the data limit and cause a lot of lag. So, my questions are: Is there another method to sending large amounts of data from the client to the server? Is there a way that the server can directly retrieve this local data? Or, is the method that I am using the best way to do it?

0
do it locally. Disillusions 61 — 7y

1 answer

Log in to vote
1
Answered by
duckwit 1404 Moderation Voter
7 years ago

Even when filtering is enabled, there are some changes to game objects which will still be propagated to the server even when they are performed by a LocalScript. For example, the default Sound script which ROBLOX uses in their characters modifies Sound instances locally, but they still play on the server, and this is intended behaviour.

Changing properties of BodyMover instances - last I checked - also replicates changes to the server, and in a way that is more efficient than using a RemoteEvent to update the properties manually. So, if you are controlling your player with body movers, just modify their properties locally to control the player and it will work fine.

Is there another method to sending large amounts of data from the client to the server?

In the general case, no. You cannot transmit data without just sending it over the network. Sending data is sending data. Either it has to go over a network to the server (which is just a computer somewhere else in the world), or it stays on your machine. You can sometimes compress data so that it takes up less space, but that is mostly ROBLOX's responsibility because they program the engine and have low-level control over networking.

In some special cases (as mentioned above) ROBLOX will replicate local changes automatically, even with filtering enabled. Use this to your advantage. The properties and instances which this works for aren't well documented, so you might have to experiment a bit, but BodyMovers and Sounds are good to go.

Let me know if you find or know of any others. We should compile a list somewhere... I think DesiredAngle of Motor6D replicates under FE, too.

0
Thanks. I think I will use BodyMovers then. I agree with you that it would be nice to have a list somewhere. Also, I think that animation instances and just positions in general should auto-replicate. WingedHorizen201 124 — 7y
0
I don't think the Position property auto-replicates. Have you tested that? duckwit 1404 — 7y
Ad

Answer this question