CFrame value changing through remote event

I have a script on the client:

local cf =,,y,z))

and on the server:


The problem is that the cframe value is different on the client then it is to the server:

any help in why this is happening is appreciated :slight_smile:

Try sending {CF.ToEulerAnglesXYZ()}, CF.Position and on the server side, to get the CFrame construct it like this:

	print(CFrame.fromEulerAnglesXYZ(Angle[3], Angle[2], Angle[1])*Position)

Tried this and it didn’t work, also tried it one the client.

Is the CFrame different again or what’s the issue

same issue cframe is different, same value as before

This should work:

local cf =,,y,z))


still has the exact same behavior, when I tested with a random parts CF it worked though.

I am having trouble reconstructing this problem how are you getting this CFrame

it is coming from a ray that I cast, this is apart of a placement system:

local cframe = CFrame.fromMatrix(

Can you try recasting the ray on the server-side

ye but it would be easier to send the cframe other then redoing the whole ray cast

I can’t replicate the issue even with the same value and the same script so sorry I am unable to help

1 Like

It’s prolly some weird precision loss issues, which won’t be noticeable. Afaik roblox serializes values that is passed through remotes and even though lua uses 64 bit double numbers, I think the engine uses 32 bit floats internally so the loss might be coming from small changes while rounding.

Now that I checked again yes I can replicate it and it shows the same thing it is 100% float imprecision float values can’t store anything and has blind spots I think that’s what is causing it

is there a work around? char limit

Well afaik no, although you don’t need a workaround as the precision loss is really minimal and won’t be noticed in game.

well when I test it is very noticeable, I ended up just calculating the cframe different and it worked normally

That’s weird, I’ll try reproducing the issue later in studio