Rotating X Rotates Z Instead of X

So, I found a building system and for some reason X rotates Z when Y is = 90. I have no idea how to change something to world space. any help is appreciated.

vid showing what is happening:

code:

local Cframe = CFrame.fromEulerAnglesXYZ(math.rad(Rot.X), math.rad(Rot.Y), math.rad(Rot.Z)) + Position

if you need more code, then please ask

its only pivoting the Cframe using the variable.

1 Like

I’ve kinda noticed the issue. the X value is the only value rotating using world space for some reason.

THIS TOOK 2 DAYS, FINALLY!!!

Code:

local Cframe = CFrame.Angles(0, math.rad(Rot.Y), math.rad(Rot.Z)) + Position
Cframe = Cframe * CFrame.fromEulerAnglesXYZ(math.rad(Rot.X),0,0)
1 Like

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