Animation slightly rotating player

Every time one of the animations in my game plays, it slightly rotates the entire player to the left while the animation plays. Inside the animation editor, this doesn’t happen, and it wasn’t intentional. The entire character, including the HumanoidRootPart, gets rotated. This doesn’t happen for any of the other animations in my game, and I use the same system for all the animations. Why would this be happening for an animation, and how can I fix it?

I probably can’t help you too much, but can I see the script and possibly a video of the animation? That would help me/other people help you.

2 Likes

Could you show the animation? It’s possible that a part such as the Torso or some other collideable part of the character is touching the floor or some other object to move it slightly.

Here’s the script:

local player = game.Players.LocalPlayer
local shovel = player:WaitForChild(“SelectedShovel”)
local abilityBools = player.PlayerGui:WaitForChild(“ScreenGui”):WaitForChild(“AbilityBools”)
local animations = {
{“Trip”,6375585975},
{“TripMayhem”,6375626349}
}
for i, v in pairs(animations) do
local animation = Instance.new(“Animation”)
animation.Name = v[1]
animation.AnimationId = “rbxassetid://”…v[2]
animation.Parent = script
table.insert(v,animation)
end
local trip = script.Parent.Humanoid:LoadAnimation(animations[1][3])
local tripMayhem = script.Parent.Humanoid:LoadAnimation(animations[2][3])

function playTrack(trackName,adjust,task)
tantrum:Stop()
trackName.Priority = Enum.AnimationPriority.Action
trackName:Play()
trackName:AdjustSpeed(adjust)
trackName.Stopped:Wait()
end

abilityBools.Tripped.Changed:connect(function(tripped)
if tripped then
if player.Mode.Value ~= 2 then
playTrack(trip,1)
else
playTrack(tripMayhem,1)
end
end
end)

And here’s a video showing it:
robloxapp-20210428-1455357.wmv (4.6 MB)

Oh, that’s odd… You sure it has nothing to do with the animation? If it doesn’t, sorry, I can’t really help you, I’m not much of a scripter.

I think this issue definitely has to do with the fact that the animation involves the player hitting the ground. I’m not sure how to fix this, though, since the animation has to involve that. Is there some way I can prevent the character from turning when that happens?

Bumping this; I still need help.

Bump. Does anyone have any ideas?

If your character is on the ground would that affect collision to do this?

I’m not entirely sure I understand the question, but I think the player’s torso collides with the ground when the animation plays.

thats what i mean. Sorry for the bad grammar i was tired at the time.

Hello! I know this is INCREDIBLY late but try disabling the AutoRotate in the Humanoid. It worked for me!