Client to client camera rotation

Im trying to find a way to send one clients camera rotation to another client but i have to do

client > server > other client

and doing that on a loop causes a lot of client to server lag
in short im trying to find a way that is as smooth as possible

I don’t think that there is any other way to do it rather than client > server > other client

if it results in 50+kbs recv then try serializing the rotation using to reduce the data sent/recived

wait i have a idea what if i send something to the server and the server changes a cframe value?

1 Like

it’s still the same client->server->client

when the server updates a property, he has to inform the clients to update the property too, so it’s the same

1 Like

i see well if you ever get any ideas on how to make it work without as much :Fire() and :OnClient / :OnServer please tell me

1- check if the camera rotation did change before sending it
2-if sending the camera rotation consumes alot of data then try serializing it using the buffer library or any serializing module
3-you can send the rotation at lower rates and lerp it on the client (only if it doesnot have to be very accurate)

Are you using unreliable remote events? They are much more efficient than normal ones. And on top of that, you can send the rotation with a cooldown.

Hi! You can easily do this with modulescript and bindable event (not remote event)
here’s code for 1 localscript, it’ll print variables

local Event = script.Parent.Event

local Module = require(script.Parent.ModuleScript)

local function Print()
	print(Module.Number)
	print(Module.Name)
	print(Module.Rotation)
end

Event.Event:Connect(Print)

Print()

here’s code for 2 localscript, it’ll change variables

--Code in second localscript
local Event = script.Parent.Event

local Module = require(script.Parent.ModuleScript)

Module.Number = 42
Module.Name = "Angelina"
Module.Rotation = CFrame.Angles(42,42,42)

task.wait(2)
Event:Fire()

And this code in ModuleScript

local module = {
	Number = 12,
	Name = "Bob",
	Rotation = CFrame.Angles(0,0,0)
}
return module

In explorer it looks like this
image

Remember: ModuleScript is just data storage method