Crouch Animation Mixing with Current Walking Anim

Hi! I’m a new developer so I don’t have a vast knowledge on scripting so please keep your replies simple for me. Thanks

I’m making a game that implements stealth crouching. I’m currently copying the script from How do I make a idle crouch and walking crouch animation play?
(just for now, I’m going to make it work later but that’s not the issue at hand here) and when I actually move, The crouch animation mixes with my current walking animation and spits out this wiggle mess for me.

robloxapp-20200827-1013340.wmv (2.0 MB)

I can’t seem to find a solution to this problem and I’m pretty sure that it’s a simple one.

use the code I referenced in the link as what I’m using.

Again, I’m new to developing and would really appreciate comprehensive answers instead of complex ones. Thanks!

2 Likes

What priority did you give the animation?
image

edit:

https://developer.roblox.com/en-us/api-reference/enum/AnimationPriority
Here is something that might help.

I think this is it! I’m using Moon Animator though so do you know where this option is on it? I should have specified that in the original post.

Moon animator?
Anyway… there is a default animation editor in roblox. (assuming you own the animation)
(video upload bugs out for me)


Put down a random player rig. (r15 i assume)


Click on the rig.
image
Just click create.
image
Import.
image
Select prefered priority and export.

Any problems? Come back to me.

What priority do I set it to? I assumed movement but that didn’t change anything. You’d think i’d have to put it at a higher priority than my current walking animation. I’ll do some tinkering, see if I can figure it out.

Higher, yes.
Action is highest i think.

Core: just base animations
Idle: overrides core
Movement: stronger but it can mix with things
Action: well… yeah

Maybe I’m doing something wrong. Here’s my timeline of events. Imported the Animation into animation editor. Updated it to action. Exported the animation to overwrite the old animation in the video, copied the ID and pasted it into the script, and then it does the exact same thing.

Sorry i was fixing my scroll wheel, but what?
You might have messed up something in the script. can you show it? or upload the place?

here ya go:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Animate
local Humanoid = player.Character:FindFirstChild(“Humanoid”)
mouse.KeyDown:Connect(function(Key)
if Key == “q” then
local Animation = Instance.new(“Animation”, player.Character)
Animation.AnimationId = “rbxassetid://5620856155”
Animate = Humanoid:LoadAnimation(Animation)
Animate:Play()
end
end)
mouse.KeyUp:Connect(function(Key)
if Key == “q” then
Animate:Stop()
end
end)

Where do i place this?
Is it LocalScript or just Script?

Local script inside of StarterPlayerScripts

1 Like

I tried with my own animation and works just fine.
(video upload is still bad)
I cannot use or edit your animation. Can you send it in a file?
Idk… like edit the animation with the random character dummy, and export the dummy into a file, and send it.

When I try to send it, it seems like it would just send you the Dummy with no animation on it, is this what you want?

image
This worksfine too.


ssss.rbxm (957 Bytes)
Like this.

Is this safe to send in a reply? Like can anyone edit it? Should I send it to you privately?

However you feel.
(30charlimit)

JustAnR15.rbxm (2.1 KB)

I think i know why now.
Since animation override happens with keyframes, not with whole animations. And if you leave bodyparts with no keyframes, then they will not be overriden.
And the LowerTorso is the “root” of the character’s body (2nd to the HumanoidRootPart)

Looks funky, but workable. Again, the biggest issue was that the LowerTorso was not keyframed, so the other animation wasn’t overriden. (hence the shaking)

ssss.rbxm (2.2 KB)

(tips for future posts: put scripts into ` these things (altgr+7)) good luck in the future :smiley:

edit: no keyframe on legs but you can probably do it
a solution mark would be appreciated

1 Like

Last question (I hope). How do I take that rbxm file and put it into roblox studio. Also where do I put it? Also, pretty obvious, how do I avoid this problem in the future?

Sorry for late reply but you just put it in the dummy and click on load animation in the dropdown of the animator. Then upload it.

Drag and drop file.

How to avoid? Just remember that only keyframes override each other, and that animations mix.