How can you make a player face any direction without making them fall over?

I was wondering how I can I make a player face any direction without tilting them / making them fall over.

game.Workspace.Player1.PrimaryPart.CFrame = CFrame.new(game.Workspace.Player1.PrimaryPart.Position, Vector3.new(math.random(-10,10),0,math.random(-10,10)) 

My problem is that my player falls over so I am just a little confused on how I can make this work properly. To be clear, I want to make the player face ANY direction without making them fall over.

Screen Shot 2022-01-11 at 12.17.25 PM

1 Like

Add some Y Position to the position you are setting the humanoidRootPart to.

game.Workspace.Player1.PrimaryPart.CFrame = CFrame.new(game.Workspace.Player1.PrimaryPart.Position + Vector3.new(0,10,0), Vector3.new(math.random(-10,10),0,math.random(-10,10))
1 Like

Try anchoring the player while it’s facing in the direction you want

Try ignoring the Y vector:

local part = workspace.Player1.PrimaryPart
local r = math.random
--not applying any changes to the Y vector, or setting it to 0
local lookAt = Vector3.new(r(-10, 10), part.CFrame.LookVector.Y, r(-10, 10))
part.CFrame = CFrame.new(part.Position, Vector3.new(r(-10, 10), lookAt)
game.Workspace.Dummy.PrimaryPart.CFrame = CFrame.new(game.Workspace.Dummy.PrimaryPart.Position, Vector3.new(math.random(-360,360),2,math.random(-360,360)))

is funky