Weird roblox animation bug

Hey, I’m trying to make a sword system using roblox’s default sword animation, (of course i only changed the animation id) but a weird thing happened, whenever i slash my sword like 2-3 times fast, the arms would go down, any ideas?

Edit: Debounce doesn’t help at all

		if debounce == false then
			local str ="StringValue")
			str.Name = "toolanim"
			str.Value = "Slash"
			str.Parent = tool
			debounce = true
			debounce = false
			debounce = false
	if isEquipped == "Equip" then
		tool = swordDictionary[1]:Clone()
		tool.Parent = char
		equippedSwords[plr.Name] = tool.Name

Try clearing the current animations that you have

Create an idle animation, and keep playing the idle animation after you slash the sword.

There is an idle animation you can see it before i swing the sword
btw im using roblox Animator script and only changed the id’s of toolNone and slash

Did you check that idle animation is looped?

Hmm where do i check it, i only changed the anim priority to Idle, published it and put the id into the script and the animation instance

It’s kinda hard to do because it’s all happening in the roblox Animator script and i have no idea what happening there besides the animation id

Its not hard, simply do this:

local Players = game:GetService("Players")
local localPlayer = Players.LocalPlayer
if not localPlayer.Character then
local humanoid = localPlayer.Character:WaitForChild("Humanoid")

local AnimationTracks = humanoid:GetPlayingAnimationTracks()
for i, track in pairs (AnimationTracks) do

I’m not sure if humanoid:GetPlayingAnimationTracks is deprecated, but if it is simply use humanoid.Animator

1 Like

Still the same, and no animations stopped, bcs it was deprecated i used hum.Animator:GetPlayingAnimationTracks()

Did it work? (30 ch rs required)

No, weirdly it’s still the same as the original post, and no animation stopped btw

Damn, OH I THINK I KNOW WHY. Try changing “toolnone” instead of idle, it should work :grinning_face_with_smiling_eyes: Also, there is two idle anims so might want to check that.

yeah my toolnone is set to my customanimation id, do you want me to put it to idle?

You can try, make sure you are removing the animation tracks too

Try putting the custom id in idleanimation1 and 2

It does work, but then i look like im holding a sword while standing still

I Think my problem was i was relying on the roblox animation script way too much, i also did it in a server script, i will write my own animation script from scratch in a local script