Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

:Destroy() is confused on behavior? closed

Hello. I am trying to delete the animation of a player. It currently errors out with attempt to index nil with destroy.

Character = game.Players.iiDkOffical.Character
Character:FindFirstChild("Animate"):Destroy()
animtracks = PHumanoid:GetPlayingAnimationTracks()
for i, v in pairs(animtracks) do
	v:Stop()
	v:Remove()
end

1 answer

figured it out in the easiest way

Character.Animate:Destroy()
animtracks = PHumanoid:GetPlayingAnimationTracks()
for i, v in pairs(animtracks) do
	v:Stop()
	v:Remove()
end

This discussion is preserved as it was. New answers, comments, and votes are closed.