You can write your topic however you want, but you need to answer these questions:
My Cframe.Angles is not rotating to the proper degree, it’s either too little off, or too far off
I’ve already tried using fromeuleranglesXYZ and putting angles as a seperate PivotTo() Line but none of them have worked, only causing further issues
I’m trying to get the levels to line up, in whatever orientation the red brick is in
THE GREEN BRICK IS SUPPOSED TO LINE UP WITH THE RED BRICK!
local Random1 = math.random(1,4)
if Random1 == 1 then
local CloneRoom1 = game.ReplicatedStorage.RoomGenerationPieces.Room1:Clone()
CloneRoom1.Parent = Room1
for i,v in pairs(Room2:GetChildren()) do
CloneRoom1:PivotTo(CFrame.new(v.End.Position) * CFrame.Angles(v.End.Orientation.X,v.End.Orientation.Y,v.End.Orientation.Z))
end
end
if Random1 == 2 then
local CloneHidingRoom1 = game.ReplicatedStorage.RoomGenerationPieces.HidingRoom1:Clone()
CloneHidingRoom1.Parent = Room1
for i,v in pairs(Room2:GetChildren()) do
CloneHidingRoom1:PivotTo(CFrame.new(v.End.Position) * CFrame.Angles(v.End.Orientation.X,v.End.Orientation.Y,v.End.Orientation.Z))
end
end
if Random1 == 3 then
local Room1Left = game.ReplicatedStorage.RoomGenerationPieces.Room1Left:Clone()
Room1Left.Parent = Room1
for i,v in pairs(Room2:GetChildren()) do
Room1Left:PivotTo(CFrame.new(v.End.Position) * CFrame.Angles(v.End.Orientation.X,v.End.Orientation.Y,v.End.Orientation.Z))
end
end
if Random1 == 4 then
local Room1Right = game.ReplicatedStorage.RoomGenerationPieces.Room1Right:Clone()
Room1Right.Parent = Room1
for i,v in pairs(Room2:GetChildren()) do
Room1Right:PivotTo(CFrame.new(v.End.Position) * CFrame.Angles(v.End.Orientation.X,v.End.Orientation.Y,v.End.Orientation.Z))
end
end