error : LoadAnimation requires the Humanoid object to be descendant of the game object
local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(Plr) Plr.CharacterAdded:Connect( function(char) print(char) local Hum = char:WaitForChild("Humanoid") print(Hum) Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false) DeathAnim = Hum:LoadAnimation(script.Parent.Reset) Hum.HealthChanged:Connect( function() if Hum.Health <= 0 then DeathAnim:Play() end end ) DeathAnim.Stopped:Connect( function() Hum.Health = 0 Hum:SetStateEnabled(Enum.HumanoidStateType.Dead, true) end ) end) end)
Gives error. Char > my username char.Parent > nil how to wait for character happen in workspace dont know, wait() on start somehow stops script
EDIT : you need to wait for character to appear in workspace, char.Parent is nil so humanoid isn't in game object, cant load animation, how to fix that idk
Try putting a wait(2) after the CharacterAdded function to wait for the character (which contains the humanoid) to load in.