Cframe not working properly

hello, i need to teleport a model in my game from one spot to another while maintaining it’s exact orientation. this is the code i have:

        local angles = plane:GetPivot() - plane:GetPivot().Position
	angles = CFrame.fromEulerAnglesYXZ(angles.Y,angles.X,angles.Z) 
	rs.Stepped:Wait()

	if location == "Water" then
		plane:PivotTo(CFrame.new(workspace.Spawns.Water:GetChildren()[math.random(1,#workspace.Spawns.Water:GetChildren())].Position)*angles)
	elseif location == "Runway" then
		plane:PivotTo(CFrame.new(workspace.Spawns.Runway:GetChildren()[math.random(1,#workspace.Spawns.Runway:GetChildren())].Position)*angles)
	end

however, the angle of the model still somehow manages to mess up
could i have some assistance please

nevermind! i fixed it by removing this line of code lol
image

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