Remote Event sending/recieving wrong cframe?

i am currently creating a script to place down objects but there seems to be a problem. i send CFrame data from the client to server but for some reason the CFrame position is correct however the orientation is wrong(i think), simply put. wrong data is being sent. heres images to help


This is me trying to check the initial CFrame(the cframe i do want, and been sent via the second argument)

the CFrame:

however when recieving the CFrame via the Server, i recieve a different Cframe(the position seems to be correct but the direction seems a bit off, sometimes the position too is wrong.

Screen Shot 2023-07-13 at 2.35.00 PM

the 2 CFrames in Comparrison


has this ever happened to you? and how did you fix it? or is something stupid i might have done?

Edit:the function is connected to remote event later.

1 Like

I’ve also been able to replicate this sort of behavior.
I was having some issue with it at first though, as common angles such as 45° were handled pretty much perfectly. But I did end up seeing that same result.


Most of these discrepancies are usually pretty small, and this to me is an indicator of some kind of compression (such as rounding to a smaller, less precise format i.e. 64-bit → 18bits for replication) so that they have less data to send between the server and the client. And, after digging for a bit, yeah this seems to be what is happening.

“Data format is compressed less aggressively - it has to be more precise. Because of this, it’s using a fully precise storage for position (3 floats, 12 bytes). Unfortunately, using a fully precise rotational representation is not a very good tradeoff - this is too much data (it’s 9 floats, 36 bytes, and it’s not reducible to a simpler form without precision loss because the rotational matrix, while mathematically orthogonal, isn’t actually orthogonal numerically due to floating point errors). So rotational representation is also compressed with some error.”

This difference is so small though, that it’s very likely that you wont notice at all.

3 Likes

oh ok, the reason i found the error was because it was noticeable but thanks for the help.

1 Like

You can try sending position and rotation separately.

I believe you can get higher accuracy doing it manually like this. I’d be interested in seeing how you notice this though

i will try that! i just need to learn how to change rotation
alone. Thanks

1 Like

You can call ToEulerAnglesXYZ on a cframe, but since you’re using a part you can just use the instance’s Orientation.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.