#how to play an animation on a rig

1 messages · Page 1 of 1 (latest)

woeful marlin
#

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

gritty matrix
#

Animators are used serverside

woeful marlin
gritty matrix
#

if you're only doing clientside work, meaning effects like a gun shooting, then yeah you can use it, but if you want anyone else to see it u have to do serverside

woeful marlin
#

i assume i make it client sided when its only for players then?

#

i see