How to get the Camera of Others Players?

Its possible. To get the Camera of the others Players? I want make a review system, like the game Paladins. When you die, you see what your killer saw exactly, including the camera and camera rotation. Ok, my question might be confusing for some people, so I will try to explain what exactly I want or want to understand. My goal and what I want to know:

How do I get the camera to a different player? This includes its rotation.

My hypothesis:
I take the camera from the workspace.CurrentCamera.

I use the Remote Events and with FireServer() or FireClient() I enter the workspace.CurrentCamera as parameter.

The probable problem:
I will get my own camera and not the other player’s.

I’m already good with Remote Events, but don’t know where to start.

Thanks for reading and I wish you a merry christmas!

1 Like

Can’t. You can attempt to make the system in such a way that the last few seconds up to the player’s death are recorded and then recreated with the tracked data, but that seems fairly expensive and slightly hacky. On the other hand, if you’re looking to just spectate the player who killed you, that’s easy - modify your own CurrentCamera to a player’s character.

2 Likes

Ultimately, if you want the other person’s camera, you can do a remote event to a server script, that returns a selected players camera cframe, by means of another remote function to that client, and then send both values back…

I’m not at my pc, but I’ve done it before, somehow. I dont think I’m explaining it correctly.

3 Likes

If i modify his function then i have my replying system And can make that the Frame replying after the death of the player, but i want that i see EXACTLLY (sorry if i mispeled the word) what and as he did to kil the player then i just need the Camera of the other Player.

Thanks, i will try tomorrow it.

cc @XlxLiveLivelyxlX

You can’t fetch the camera of another player. Their camera does not exist on your client. What ever you do amounts to modification of a new or existing camera for the current client based on some data you request from another client.

you can replicate camera cframe to server (by editing camera module) and then, when player die, server will replicate him his killer camera cframe and on player, just set camera to scriptable and update its cframe by the recived from server

The point is, it’s far too expensive in terms of data. While you may do this, what’s the point? You’ll end up with a simple aesthetic, but hinder the performance of your game. Better not to do it at all.

Also, a Client-Server-Client communication is going to be inaccurate. Especially when dealing with Camera CFrame, you’ll see the panning lag of the other client and other artefacts.

2 Likes

Ya, and also there will be delay, so I can see moment when he is killing me, but client-server-client replication is the only way.

1 Like

Ok, if i read you replys, its currently impossible to get the Camera of another Player.

Ok, i have a idea, if i create a table in the Player1 with the Camera CFrames, then can i send the table to the Player2? Then i can use the CFrames in the Table in Player2 to make my reply system.

That’s a solution for it, as @wevetments said creating a creative system that handles this is very easy, just requires a bit of clear vision of things, and also it will require a lot of the game’s performance. As you suggested, which is a very good idea honestly, to keep on saving the Player1’s Camera’s CFrames in a table, and if Player2 was killed by Player1, that table will be sent to Player2 to see the replay, and you may wanna make the replay 5 seconds long for example, and keep on overwriting anything that’s before those 5 seconds replacing it with newer CFrames.

1 Like

You can get the killer client to send recorded data about its camera CFrame to the server, then pass that to the killed client, but you run into a few problems:

  1. It may be too much data if you record it at a full 60Hz, you’d have to record the data at a lower frame rate and then interpolate
  2. It won’t always match up with the rest of the game - what the server sees and what the client sees are different, so if you try and use the clients camera position with recorded info from the server, it won’t always work as you’d expect
  3. The client can lie and send you nonsense data, although this isn’t too much of an issue really as long as you’re not using it as evidence when considering exploiters

You have to try and predict where the killers camera was using information the server has.

1 Like

Yes, i have think about this Problem and i think that i have found a solution:

--i will make a cframe update system for update the camera cframe. The Cframe below is only for help you to visualize my idea.
local Table = {
   CameraInformation1 = {
      CFrame.new(),
      LifeTime = 5
   }
}

Ok, the First CFrame has a LifeTime of 5 seconds, and after this 5 seconds the CFrame Information will be delete and the CFrame Information Number2 will change it Name to CFrame Information Number1. This is only a idea, can you write a feedback about?

Yes you can 100%.

Just store each camera’s cframe to the server, and retrieve. It wont be smooth like client to client per say, but with some interpolation it would be fine.

To say cant is misleading to people who are looking for help on the topic.

There is no limit to what can be done. It’s a matter of overcoming these hurdles with some out of the box thinking.

This is woody and buzz all over again. :slight_smile:

1 Like

What do you mean?

That’s not fetching the camera of another player, that’s transferring data from one client to another with the server as a facilitator. You cannot fetch the camera of another player because it’s not replicated in the first place. Sending over a CFrame is not fetching another player’s camera.

It’s not misleading, because you can’t do it in the first place. Read up on the client-server model and look more into understanding the limitations of the engine as well as how replication works before asserting things that are simply untrue.

I think they are trying to do something like PVEye. You can see an example of the “camera watch” system used there.
-video snipped-

This would take modification to make it work as a replay system, but transferring the cameras movements is the core concept here.

It’d be worth, uh, sending that through DM due to the language used in the video. :slightly_smiling_face:

I’m not too sure what’s going on in the video exactly, but are you attempting to notion towards the spectating behaviour or is there something special meant to be going on here? It looks mostly all real time, in which the camera would just be set to the target character’s humanoid.

What I’m explicitly disagreeing with is that there isn’t a way to fetch another player’s camera because the camera object is not replicated in the first place. The response that came back to me was describing the transfer of Camera CFrame through the server, which is not the same as getting another player’s camera at all.

1 Like

If you’re talking about getting CFrames, I would use RemoteFunctions, but that would be highly dangerous due to the client being able to exploit and easily make the server crash. You could maybe try recording each player’s camera positions every say .1 seconds and firing a remote to the server to put in some special data table, but really this could also be exploited. If you’re talking about getting the instance of another player’s CurrentCamera, that would be physically impossible.

1 Like

Ok, then i dont should use BindableFunctions due to that the connect two client and this will be more dangerous. Should i use bindable functions with two ServerScripts placed inside the two Players? Exploiters can exploiting LocalScripts, but not ServerScripts.

BindableFunctions are only for one client, meaning you can’t get the camera using bindables.

1 Like