It has this weird stutter when one of the punches are playing.
So, as this is scripting support, can you show us what you are using to load the animations at the moment.
It looks more like the problem is a sequence of animations not playing in sync.
Have you considered using this?: AnimationTrack | Documentation - Roblox Creator Hub
AnimationTrack.Stopped:Wait()
I’m using humanoid:LoadAnimation()
could you show the script? we can’t help you if we can’t see what’s wrong
This is literally the script…
humanoid:LoadAnimation(animation)
spawn(function()
local OldCombo = Combo
StandModel.Values.Combat.Value = true
wait(Timer)
if Combo == OldCombo then
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(2,1,3)).p
Combo = 0
Enabled = false
StandModel.Values.Combat.Value = false
wait(2)
Enabled = true
end
end)
if Combo == 1 then
local Anim1 = StandModel.AnimControl:LoadAnimation(RightPunch)
Anim1:Play()
StandModel.HumanoidRootPart.Swing:Play()
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0.25,-3)).p
Anim1:GetMarkerReachedSignal("punch"):Connect(function(punch)
Hitbox(4, 5)
end)
wait(0.6)
elseif Combo == 2 then
local Anim2 = StandModel.AnimControl:LoadAnimation(LeftPunch)
Anim2:Play()
StandModel:FindFirstChild("HumanoidRootPart").Swing:Play()
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0.25,-3.25)).p
Anim2:GetMarkerReachedSignal("punch"):Connect(function(punch)
Hitbox(4, 5)
end)
wait(0.6)
elseif Combo == 3 then
local Anim3 = StandModel.AnimControl:LoadAnimation(RightPunch)
Anim3:Play()
StandModel:FindFirstChild("HumanoidRootPart").Swing:Play()
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0.25,-3.5)).p
Anim3:GetMarkerReachedSignal("punch"):Connect(function(punch)
Hitbox(4, 5)
end)
wait(0.6)
elseif Combo == 4 then
local Anim4 = StandModel.AnimControl:LoadAnimation(LeftPunch)
Anim4:Play()
StandModel:FindFirstChild("HumanoidRootPart").Swing:Play()
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0.25,-3.75)).p
Anim4:GetMarkerReachedSignal("punch"):Connect(function(punch)
Hitbox(4, 5)
end)
wait(0.6)
elseif Combo == 5 then
local Anim5 = StandModel.AnimControl:LoadAnimation(RightPunch)
Anim5:Play()
StandModel:FindFirstChild("HumanoidRootPart").Swing:Play()
Attachment1.WorldPosition = (Player.Character:FindFirstChild("HumanoidRootPart").CFrame * CFrame.new(0,0.25,-4)).p
Anim5:GetMarkerReachedSignal("punch"):Connect(function(punch)
Hitbox(4, 5)
end)
wait(2)
else
Combo = 0
end
Enabled = true
end
end
end)
Apparently settings the weight, fadetime, speed arguments in :Play() prevents this bug? Idk its weird…
Why are you running that animation-playing code in parallel to everything? Animations should be done in series (again reffering to what i said earlier) your animations aren’t playing in a sequence, I’m assuming that you run that code again before the current animation can finish playing (Could be the reason tweaking the speed works), Try re-scripting it to make it run in series rather than in parallel.
This is for anyone else reading the post who’s stuck on the same issue, This isn’t a bug, just make sure your animations are playing in series and don’t play over eachother.
How do i fix long pauses in between the punches when i use AnimationTrack.Stopped:Wait()? there are like really long pauses after each punch before you can punch again. The code is literally the same thing but instead of wait(0.6), its AnimationTrack.Stopped:Wait()
Use contentProvider to pre-load the animations,
To preload animations, I’d suggest to use :PreloadAsync() on the animations you’re wanting to use.
I preloaded the animations by using :PreloadAsync() and making them play and stop when the player joins the game and it’s still doing it.
I found out why it was happening, it’s because it was a weird keyframe at the end…