Transforming entity positions with entity.transform
So I have this simple plugin stub. You can find the code here, it's not very long.

If you don't feel like reading the code, here's what it does in humanspeak:

1) During OnMountEntity(entity, player):
a) if it's a BaseInstrument (in my case, a piano), the plugin takes note of the entity and player variables and stores a reference to the two (as BaseEntity) - piano and piano player.
b) if it's a BaseChair (in my case, an invisible chair) the plugin stores a reference to entity and player in two different variables (also as BaseEntity) - chair and chair sitter.

2) During OnDismountEntity(entity, player):
All the entities go back to their original positions (stored when taking the references).
If it's a BaseInstrument and the piano and/or chair related references are not null, set them to null.

3) During OnTick()
If the piano reference Entity is not null, do the following:
1) Create new Vector3 (0.25, 0, 0)
2) Add this vector as a local transformation to all 4 entities: the piano, the piano player, the chair, and the chair sitter, effectively moving all of them according to the piano's X axis by 0.25 units (meters?).

So here's the problem: I tested this with a friend. I was the piano player, he was sat on the invisible chair. Only the piano and myself have moved - not the chair or the chair sitter. I don't know if it matters or not, but I was running the server locally and he joined from a different continent.

I tried both directly using entity.transform (without getting the BaseNetworkable first) and, as in the current version of the code, transforming the BaseNetworkable I've gotten for all 4 entities involved.

The result is always the same: the chair and chair sitter stay pretty resolutely earthbound while the piano and piano player move.

TL;DR: Having collected references to entities earlier, how do I properly transform those entities positions for all clients and the server so they actually move for everyone?

I need all 4 of us moving in unison for this... project.



You can probably figure out what I want to achieve: Look how wonky the camera is. I don't want to move it manually. I'm trying for a steadycam-thinga-ma-jig like they do in Vanessa Carlton's original video. My friend, the cameraman, is going to be invisible on an invisible chair and record a demo of everything and everyone moving together - instead of me hoping for camplerp and superb manual tracking skills.

All help is greatly appreciated. And don't you diss my guilty pleasure girly pop music, if you actually can resist dancing when that hook drops, you clearly are a stronger man than I am :D

This looks old to me, but can't you just take your entity and send a server update? 

BaseEntity entity;

entity.transform(stuff);
entity.SendNetworkUpdate();​

Thanks bro, but obviously I have figured things out in the past year or so ;) I should've probably mentioned it so the thread could be closed, but thanks anyway!