Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to simply set the rotation of HumanoidRootPart?

For some reason when I just want to do the simplest of things I have the most trouble. I have tried to look for an answer to this question but the only things I can find are things about setting angles using CFrame which isn't what I'm looking for. All I want to do is for my player's HumanoidRootPart to set the Rotation to (0,-9.1,0) but for some reason whatever I try doesn't seem to work. Is there a way to just simply set it's value to something?

1 answer

CFrame.Angles()is the only way you set the rotation/orientation.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character) -- PlayerAdded and CharacterAdded are just for whenever the player joins and their character loads
		character.HumanoidRootPart.CFrame.Angles(0, math.rad(9.1), 0)
	end)
end)

When you're changing one of the values in the orientation, you have to use math.rad right before it.

This discussion is preserved as it was. New answers, comments, and votes are closed.