I am trying to make a pushup animation however the animation seems to fuse with the idle animation. Here is my code
game:GetService("ReplicatedStorage").ProcessPushup.OnServerEvent:Connect(function(plr, isHolding)
local char = plr.Character or plr.CharacterAdded:Wait()
local anim = char.Humanoid:LoadAnimation(char.PushupAnim)
if isHolding then
local tracks = char.Humanoid:GetPlayingAnimationTracks()
for _, v in pairs (tracks) do
v:Stop(0)
end
anim:Play()
char.Humanoid.WalkSpeed = 0
else
local tracks = char.Humanoid:GetPlayingAnimationTracks()
for _, v in pairs (tracks) do
v:Stop(0)
end
char.Humanoid.WalkSpeed = 16
end
end)
This is a video of the phenomenon, look at the legs
Here is what the animation is suppose to look like