-
What do you want to achieve? Trying to keep the player upright at all times without hindering any other form of movement
-
What is the issue? When I use AlignOrientation to keep the player upright, it won’t work (while the humanoidstatetype is set to physics)
-
What solutions have you tried so far? Setting the orientation (hinders movement), AlignOrientation
Disabling the physics humanoidstatetype is not something I’m going to do as it’s essential
turns out the solution was as simple as this:
local hrp = script.Parent:WaitForChild("HumanoidRootPart")
local attachment = Instance.new("Attachment")
attachment.Axis = Vector3.new(0,1,0)
attachment.Parent = hrp
local orientation = Instance.new("AlignOrientation")
orientation.Mode = "OneAttachment"
orientation.Attachment0 = attachment
orientation.AlignType = "PrimaryAxisParallel"
orientation.PrimaryAxis = Vector3.new(0,1,0)
orientation.Parent = hrp