I can't understand, why my player goes at random position of map when I'm using script.Parent.HumanoidRootPart.CFrame = CFrame.new(0, -90, 90).
Also I used script.Parent.HumanoidRootPart.CFrame *= CFrame.Angles(0, math.rad(-90), math.rad(90)) but that rotates player from his existing orietation. not creating new.
So can someone tell how to rotate player with new orientation?
✓ ANSWER ACCEPTED
CFrame working strange, can someone tell how to use this correctly?
1 answer
✓ Accepted answer
Set CFrame to a new CFrame consisting of only HRP's position, no rotation. Then apply the rotation through CFrame.Angles
script.Parent.HumanoidRootPart.CFrame = CFrame.new(script.Parent.HumanoidRootPart.Position) * CFrame.Angles(0, math.rad(-90), math.rad(90))
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
tysm, that helped me alot.