How to get the Camera of Others Players?

But in Alvin_Blox tutorials she used ServerScript, and it work fine.

What are you talking about? Can you send me a link to what you mean?

1 Like

Yes, wait a few seconds please.

1 Like

Here:

That is because there is not a client calling it for data, but it is two server scripts contacting each other. You cannot use a BindableFunction to contact other clients with a LocalScript.

I have ask if i can place 1 ServerScript in each Player (Player1, the killer, has a serverscript. And player2, the killed, has a serverscript).

You cannot get a player’s CurrentCamera if it is not a LocalScript, therefore if you wanted to grab the player’s camera, this wouldn’t work.

1 Like

My (pretty outdated) replay module handles smoothness by keeping timestamps per CFrame and getting CFrames every Heartbeat. I track camera movements on Heartbeat and use tick() as a relative timestamp and then simply replay CFrames on RenderStepped.

As for the OP you would need to track camera CFrames on the client and send them to the server with a BindableEvent. This wouldn’t be that expensive even per frame (you’d be looking at 48 bytes per network frame of the ~853 soft limit). You’d additionally need to track CFrames of objects on every client so they can replay what was happening. Finally you’d just need to have the server send the recorded CFrames to the client to replay with and it can replay what it recorded.

Note: You should discard (using table.remove or setting data in the table to nil) anything past the amount of time you want the replays to be to make sure you don’t waste server memory.

4 Likes