You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Gun animation
-
What is the issue? storing the animationtrack in an array and then once unequibbed we use :stop() and :destroy() does not disable or delete the animation
-
What solutions have you tried so far? I’ve tryed printing what animation’s playing, and after the :stop() and :destroy, It still prints and persists
script.Parent.Equipped:Connect(function()
game.ContextActionService:BindAction("RELOAD", reload, true, Enum.KeyCode.R)
table.insert(load,char:WaitForChild("Humanoid").Animator:LoadAnimation(anim))
table.insert(load,char:WaitForChild("Humanoid").Animator:LoadAnimation(animR))
table.insert(load,char:WaitForChild("Humanoid").Animator:LoadAnimation(animS))
load[1]:Play()
end)
script.Parent.Unequipped:Connect(function()
char = plr.Character
game.ContextActionService:UnbindAction("RELOAD")
for i,v in pairs(load) do
print(v)
v:Stop()
v:Destroy()
print(char.Humanoid:GetPlayingAnimationTracks())
print("DESTROYED")
end
print(char.Humanoid:GetPlayingAnimationTracks())
load = {}
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.