CFrame not replicating correctly

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    Simple script that generate parts inline with certain starting angle. One part angled, then the rest will just follow.

  2. What is the issue?
    The angled parts is replicated wrong to clients (orientation supposed to be 10 degrees, but in client appears as 9.998)
    Server’s CFrame (the correct one)
    image
    Client’s CFrame
    image

  3. What solutions have you tried so far?
    Instead of leaving everything to the server, I had to make the server tell clients the actual angle, it works though.
    I don’t know if this is Roblox’s engine problem or just my PC acting up.

Place for reference (please check the Track script under Workspace.)
inlineParts.rbxl (41.9 KB)

Sorry if I missed anything with the details, been a very long time since the last time I visited devforum.

2 Likes

I’m pretty sure that a .002 difference isn’t gonna cause problems for you.

2 Likes

You cannot assume anything as small as 0.002 degrees something people wouldn’t notice or care. I am just asking for help

1 Like

Alright alright, can you show the code which replicates the CFrame?

1 Like

There is no CFrame replication, all done by the server with repeating part.CFrame = part.CFrame * CFrame.new(0, 0, -Z) for every part that is generated.

I just want to add the first part is angled with math.rad(10) at the start, so in theory it should just replicate 10 across all clients.

1 Like

Yep, mb I misread the topic, so after a bit of digging, I found this topic from way back in 2018, which improved the rotation precision for CFrames but still isn’t entirely accurate with a error rate of max 0.04 degrees and avg 0.003 degrees. Am not sure if this has been improved further but ye I’ll lyk if I find anything else.

1 Like

Ik im probably late but you could probably use math.ceil for that…

1 Like

yeah no i was about to say let math class do the work for you trust @kanamoru

there is no LocalScript doing the replication or anything, just the server doing the math of just math.rad(10), in theory it shouldn’t replicate 9.998 degrees to the client.

also it would be a burden to run math.ceil on every angled part in game.