How would I rotate a player like in the image below

Say the noob is facing the wall, I want to rotate them left, how would I do that, I’m not very good with CFrames!

1 Like

You have to use Model:SetPrimaryPartCFrame():

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

char:SetPrimaryPartCFrame(char.PrimaryPart.CFrame * CFrame.Angles(math.rad(90), 0, 0))

Change it to the Z axis if it doesn’t turn the right way. The number in math.rad() is in degrees (so we’re turning it into radians since CFrame.Angles accept radians only).

5 Likes

I tried that with this exact code

humrp.CFrame = CFrame.new(humrp.CFrame * CFrame.Angles(math.rad(-90),0,0))

Gave me this error : 11:55:49.774 - Workspace.xurmx.Climb:112: bad argument #1 (Vector3 expected, got CFrame)

@xurmx
Try to use this code,

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

2 Likes

@xurmx
Try to use this code,

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

1 Like

Oh I got a solution already I just needed to change the math.rad to the Z position, thanks though!