How to get the Camera Cframe in workspace

Hi, I am making a plugin and it needs the camera’s CFrame value. The only thing is that the script is a server script and the camera only works on local scripts. Is there a way I can get the user’s camera, even in-game?

You don’t need to use a Server Script a plugin. Try using a local script

Yes, you can on the client. In a local script in StarterGUI or StarterPlayerScripts, you can do the following:

game.Workspace.Camera.CFrame

Doing it through a plugin is an uneeded step as this does the work.

Use a RemoteEvent (FireClient). In a Script, then you can do (OnClientEvent) in a localscript and get the CFrame and then if you want it for all you could fire a remoteevent, this is named (RemoteEvents Communication).

Thanks, I tried it and it works on the server script for some reason!