Hi everyone, just wanted to know if its possible to update player walking animation without stopping.
character.ChildAdded:Connect(function()-- child added (expecting a tool)
if character:FindFirstChildOfClass("Tool") then-- checking if player is holding a tool, if so animation changes to another one
character.Animate.run.RunAnim.AnimationId ="http://www.roblox.com/asset/?id="..14253811514 else -- spear hold walk
character.Animate.run.RunAnim.AnimationId ="http://www.roblox.com/asset/?id="..14253738701-- default walk
end
end)
character.ChildRemoved:Connect(function()-- child removed(expecting a tool to be removed)
if not character:FindFirstChildOfClass("Tool") then-- checks if player isnt holding a tool, if so back to default walk, else keep same animation
character.Animate.run.RunAnim.AnimationId ="http://www.roblox.com/asset/?id="..14253738701--default walk
else
character.Animate.run.RunAnim.AnimationId ="http://www.roblox.com/asset/?id="..14253811514-- spear handed walk
end
end)
this script changes animations when player equips or unequips a tool, but if i keep walking while doing it, animation will only update after i stop walking.