I have to define a strategy to avoid performance loss when communicating between local script and server.
During my game, I move an object with the mouse.
Inside the local script, I change the object’s CFrame according to the mouse position.
But to confirm the object’s final position (when the user left-clicks), I need to do some validations, such as if this object is inside a valid area.
I wanted to pass the object instance as an argument to the server:
Result = RemoteFunction:InvokeServer("MyFunction", MeshPart)
My question is: when I pass the instance of a MeshPart as an argument, what exactly is sent?
- Is only one reference key sent (few bytes)?
- Or are all instance properties sent (a huge block of information)?