How do i change walking animation and idle animation for a sword or tool?
So what I'm trying to do is make a idle anim and walking anim for a sword and it changes whenever you wield it, but im having trouble switching between when its idle or walking
my script so far
01 | local tool = script.Parent |
02 | local Handle = tool:WaitForChild( "Handle" ) |
04 | local Equip = tool:WaitForChild( "Equip" ) |
05 | local Unequip = tool:WaitForChild( "Unequip" ) |
06 | local Slash = tool:WaitForChild( "Slash" ) |
08 | local Idle = script:WaitForChild( "KatanaIdle" ) |
09 | local otherAnim = script:WaitForChild( "KatanaOther" ) |
11 | Equip.OnServerEvent:Connect( function (Player) |
12 | local Character = Player.Character |
13 | local Humanoid = Character:WaitForChild( "Humanoid" ) |
15 | local Animate = Character:WaitForChild( "Animate" ) |
16 | local toolnone = Animate:WaitForChild( "toolnone" ) |
17 | local toolnoneAnim = toolnone:WaitForChild( "ToolNoneAnim" ) |
18 | local regAnim = toolnoneAnim.AnimationId |
20 | Player.Character.Humanoid.Running:Connect( function (speed) |
22 | toolnoneAnim.AnimationId = Idle.AnimationId |
24 | toolnoneAnim.AnimationId = otherAnim.AnimationId |