I imagine that the script is parented to only one character. In that case, it is better that you directly reference the humanoid than using :GetChildren() and play the animation.
1 | local humanoid = script.Parent:WaitForChild( "Humanoid" ) |
2 | local animation = humanoid:LoadAnimation(game.Workspace.CultistAnimations.Cheer) |
Or if for some reason, the characters are all in a folder, you can do:
02 | local characters = script.Parent:GetChildren() |
04 | for i,v in pairs (characters) do |
05 | if v:FindFirstChild( "Humanoid" ) then |
07 | local animation = humanoid:LoadAnimation(game.Workspace.CultistAnimations.Cheer) |
The problem is that the script itself is a child of its parent and the script has no humanoid which throws a nil value.