Setting PrimaryPart Orientation to another orientation not working

So i’ve been trying to make a random room generator, but im stuck on aligning the doors and exits, im trying to get it working first before i start making the full randomizer, the doors positions end up correct but the orientation isn’t and im not sure why, i looked around the devforum and looked it up quite a bit but i couldnt find a solution.
This is the code:


and here is the output i get:
image
(the starter room is the one with only one, green line)

CFrame.Angles usually works best with math.rad() try if doing this works out:

CFrame.Angles(
	math.rad(previousroomorientation.X),
	math.rad(previousroomorientation.Y),
	math.rad(previousroomorientation.Z)
)

that fixed it, thank you so much

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