Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont my AnimationTrack stop at all?

Asked by 6 years ago

so im trying to make a combat and when im trying to make block i want it to stop but it wont stop...????

wait(.1)
plr = script.parent.Parent.Parent
char = plr.Character
rs = game.ReplicatedStorage
anims = rs.Animations
remote = rs.Remote
idlea = anims.FistIdle
blocka = anims.FistBlock
block = remote.urmomgae
equip = remote.equip
tool = script.Parent


-- spacing

equip.OnServerEvent:connect(function(player, thingy)
    local f = char.Humanoid:LoadAnimation(idlea)
    if thingy == false then
    f:Play()
    end
    if thingy == true then
for i,v in pairs (char.Humanoid:GetPlayingAnimationTracks()) do
    v:Stop()
end
    end 
end)


block.OnServerEvent:connect(function(player, bool)
    local blockplay = char.Humanoid:LoadAnimation(blocka)
    if bool == true then

    blockplay:Play()
    else if bool == false then
    blockplay:Stop()
    end
    end
end)



0
Is the animation looped? If so, that may be the problem. 222ono222 47 — 6y
0
Yeah it is. JohnJohniamm55 21 — 6y
0
But i need some of them to be idle JohnJohniamm55 21 — 6y

Answer this question