Default walking animation messing with crouch animation

Hi! Thanks a lot for taking time out of your day and reading this. I’m working on this crouch system. I have 2 different animations, the crouch idle and the crouch walk. The crouch idle works just fine, but when I start walking and the crouch walk starts playing, the default roblox walk animation starts messing with it and it doesn’t work properly at all. The crouch walk has the top priority (action) and is also looped, so I’m just really confused. If anyone knows please feel free to let me know.

2 Likes

It may be because the animation priority, I am not sure what Roblox’s default animation priority is, but try setting your crouch-walk priority to ‘Action2-4’, do this when uploading the animations to Roblox and not in scripts.

Change the animation priority to walking in the roblox official animation plugin and then export it to your current animation.

Then in your script change the default running animation by changing the animations in the running value in the animate local script in the player.

You can find it while in game in your character and then just select the location of where the animation is and replace it. I have done the same for a script of mine

local walking = script.Walking
local idle = script.Idle

script.Parent.Equipped:Connect(function()
	
	local char = script.Parent.Parent
	local hum = char.Humanoid
	local idleanimator = char.Animate:FindFirstChild("idle").Animation1
	local runninganimator = char.Animate:FindFirstChild("run").RunAnim
	
	local oldanims = Instance.new("Folder")
	
	local oldrun = runninganimator:Clone()
	local oldidle =  idleanimator:Clone()
	
	oldanims.Parent = char
	oldidle.Parent = oldanims
	oldrun.Parent = oldanims

	hum.WalkSpeed = 0
	wait(0.001)
	hum.WalkSpeed = 16
	idleanimator.AnimationId = idle.AnimationId
	runninganimator.AnimationId = walking.AnimationId
	
	script.Parent.Unequipped:Connect(function()
		hum.WalkSpeed = 0
		wait(0.001)
		hum.WalkSpeed = 16
		idleanimator.AnimationId = oldidle.AnimationId
		runninganimator.AnimationId = oldrun.AnimationId
		oldanims:Destroy()
	end)
	
end)


1 Like

This is for a part equipping script tho so it won’t work on your ingame thing. Instead you should make a local script in the starter character scripts folder in the player service inside the studio.

Local scripts also show animations to all clients if you use the animator I just used a server script on my script since it wouldn’t work via local script

Hi! I’ve already done that, I also confirmed that using prints as you can see in the output.

Surely there’s an easier way of doing this?

Not sure if it is, but it could be because of workspace.AnimationWeightedBlendFix. Try disabling that and see if it does anything.

Yes, I am aware of that, but there isn’t just an ‘Action’ priority, there is 4 of them, and you should try to set the priority to the 4th or 3rd one, your choice.

image

image

i am late but its not really about the priority, i recomend to keep that in movement but u gotta make sure u do a keyframe on every single bodypart, if not roblox is gonna play default animation on those parts, hope this helps