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