My animations have this weird snap when I load them in and play them over an existing animation.
Code:
for _, anim in Animations:GetChildren() do
anim:GetPropertyChangedSignal("AnimationId"):Connect(function()
for _, playingAnim in pairs(hum:GetPlayingAnimationTracks()) do
if playingAnim == animTracks[anim.Name] then
animTracks[anim.Name] = animator:LoadAnimation(anim)
animTracks[anim.Name]:Play()
task.spawn(function()
playingAnim.Priority = Enum.AnimationPriority.Core
playingAnim.DidLoop:Wait()
playingAnim:Stop()
end)
end
end
end)
end
That happens because the running animation moves the arms on the player and the other anim is trying to do the same, but the running anim moves the hands faster? I explain myself very poorly but you could try setting the equip animation priority to walking that worked for me at least
This worked thanks! I have a similar issue with switching default roblox animations, The animation seems to reset before playing the new idle instead of doing it automatically. Any idea how to fix it?
Code:
for _, anim in char.Animate:GetDescendants() do
if anim:IsA("Animation") then
anim:GetPropertyChangedSignal("AnimationId"):Connect(function()
if anim.AnimationId == "" then return end
for _, playingAnim in pairs(hum:GetPlayingAnimationTracks()) do
if playingAnim.Name == anim.Name then
local newAnim = animator:LoadAnimation(anim)
task.spawn(function()
while task.wait() do
for _, newPlayingAnim in pairs(hum:GetPlayingAnimationTracks()) do
if newPlayingAnim.Name ~= newAnim.Name and newPlayingAnim.Name ~= "Unsheathe" and newPlayingAnim.Name ~= "Sprint" and newPlayingAnim.Name ~= "SprintINBTWN" then
newAnim:Stop()
return
end
end
end
end)
newAnim:Play()
playingAnim.Priority = Enum.AnimationPriority.Core
playingAnim:Stop()
end
end
end)
end
end