Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to rotate a player without bodymovers?

Asked by 4 years ago

Hello. I am trying to rotate a player with CFrame without bodymovers. I want to rotate it like orientation

I have tried this, but it sends me to 0,0,0

PLR.HumanoidRootPart.CFrame = CFrame.new(PLR.HumanoidRootPart.Position, 1 , 1, 1, 1, 1,1)

2 answers

Log in to vote
0
Answered by 4 years ago

I don't see why you wouldn't just use bodygyro, but you can take the HRP's cframe and multiply it by CFrame.Angles, which will successfully rotate it.

--I recommend using math.rad() - will convert it to degrees

--So, if you want to rotate it 90 degrees on the y axis:

HumanoidRootPart.CFrame = HumanoidRootPart.CFrame * CFrame.Angles(0, math.rad(90), 0)

Ad
Log in to vote
0
Answered by
Subsz 366 Moderation Voter
4 years ago

You can simply take the cframe and multiple it into CFrame.Angles

hrp.CFrame = hrp.CFrame * CFrame.Angles(rx,ry,rz)

Answer this question