Server and Client produce different math results from the exact same equation

System Information:

OS: Windows 11 Home 23H2
CPU: Intel i5-8300H @ 2.30GHz

Date First Experienced: 3/22/2025
Date Last Experienced: 3/22/2025

Issue:

When running the exact same CFrame math on the client, and on Roblox servers specifically, the server produces slightly different information.

Reproduction Steps:

  1. Create a LocalScript and a server Script
  2. Set contents of both scripts to the code provided below
  3. Publish place
  4. Join place and open developer console to compare results
local viewAngles = Vector2.new(41.1198654, -50.4001579)
local moveDirectionObjectSpace = Vector3.new(0, 0, -1)

print('RESULT:', CFrame.fromEulerAnglesYXZ(0, math.rad(viewAngles.X), 0):VectorToWorldSpace(moveDirectionObjectSpace))

Video of the issue:

Place File I published:
math-bug-repro.rbxl (57.1 KB)

Expected behavior

Expected Behavior:

The server and client should get exactly the same results from the code, as it is for other types of math.

2 Likes

Error 404: Calculation not found. It seems like the numbers have decided to go on vacation and the math just isn’t cooperating today. The algorithm has been informed that CFrame.fromEulerAnglesYXZ(0, math.rad(viewAngles.X), 0):VectorToWorldSpace(moveDirectionObjectSpace) equals a surprise party, and the remainder of the equation is now hosting a disco. Please try again after the algorithm has returned from its sabbatical to the Bermuda Triangle.

1 Like