whenever i play an animation on a rig via local script it doesnt really work
local Melee = script.Parent.PathfindingScript.Melee
local Ranged = script.Parent.PathfindingScript.Ranged
script.Animate.OnClientEvent:Connect(function(Animation)
local Animator = Enemy.Humanoid:WaitForChild("Animator")
if Animation == "Dash" and Animator then
local AttackAnimation = Animator:LoadAnimation(script.Animations:WaitForChild("Dash"))
AttackAnimation.Priority = Enum.AnimationPriority.Action2
AttackAnimation:Play(0, 1000, 1)
end
end)
the animate is a remoteevent, and it is fired via FireAllClients() or something, the string passed is "Dash".
how it looks like right now