How to keep a model/player upright

I’m making a Vr game like Gorilla Tag with a custom character and I need to keep the body upright (So you don’t fall on your face or your side) I only need the RootPart upright and for it to turn freely on the Y axis

image


I tried this:

local Char = script.Parent
local RunService = game:GetService("RunService")

RunService.Stepped:Connect(function()
	Char:PivotTo(Char:GetPivot() * CFrame.fromEulerAnglesXYZ(math.rad(0), Char:GetPivot().Rotation.Y, math.rad(0)))
end)

But it just flings itself

3 Likes

You can use BodyGyro to keep the character’s root upright.
Even though it’s deprecated, it allows you to change how much force is applied on each axis so you can still turn on the Y axis.
I also recommend using Humanoid:SetStateEnabled() in order to disable states that might fling the humanoid such as Ragdoll and FallingDown

3 Likes

It worked but I was stuck on BodyGyro being deprecated so I made this topic

I guess it’s the only way


Thanks for helping me :happy3:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.