Hi, so i’m making some obstacles for my game, and also some animations for them. The animations work fine when the obstacles are facing their direction, but if the obstacle is for example facing downwards and the animation plays, the animation will still be facing upwards instead of facing downwards. Basically, the animation always faces the same direction no matter what, which isn’t what i want. What i’m doing is setting the HumanoidRootPart’s CFrame to a part’s CFrame. I’ve tried setting the Torso’s CFrame, but it wouldn’t work either way. And i’ve also tried deactivating AutoRotate for the Humanoid, but still nothing. Any help?
Hi
I belive you can do this using the deprecated BodyGyro
. When a player is launched in the air you should set it’s state to Physics, That will disable the automatic rotation of the humanoid, then create a BodyGyro
inside of the HumanoidRootPart
and change it’s orientation to match the launchpad orientation or anything you want. Then add a touch event for the character parts so when one of them is touched, the player state should be changed back to normal and destroy the BodyGyro
.
Here is a demo place that you can test:
BasePlate.rbxl (54.5 KB)
Hi, thanks for the idea. I tried it with AlignOrientation instead, and it does work, but there’s an issue: the character seems to get his position altered slightly, and also it instantly snaps back into place once the AlignOrientation is deleted as shown in the video. Any help?
--------------------------------------
local Attachment = Instance.new("Attachment", Root)
Attachment.Name = "RingAttachment"
--------------------------------------
local Orientation = Instance.new("AlignOrientation", Root)
Orientation.Name = "RingOrientation"
Orientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
Orientation.Attachment0 = Attachment
Orientation.MaxTorque = math.huge
Orientation.Responsiveness = 200
Orientation.CFrame = self._Hitbox.CFrame
--------------------------------------
local Velocity = Instance.new("LinearVelocity", Root)
Velocity.Name = "RingVelocity"
Velocity.Attachment0 = Root.Attachment
Velocity.MaxForce = math.huge
Velocity.VectorVelocity = Root.CFrame.LookVector * 125
--------------------------------------
Debris:AddItem(Attachment, self._Duration)
Debris:AddItem(Orientation, self._Duration)
Debris:AddItem(Velocity, self._Duration)
--------------------------------------
I believe AlignOrientation or BodyGyro can’t control your character orientation correctly even if their force is set to math.huge
until you set the HumanoidState of your character to Physics
because in the normal state the humanoid will always try to recover it’s original orientation in the normal state.
Did you do that?
Nevermind, it’s just the part that the player moves to wasn’t rotated correctly, it works now.