I've looked up dev forums that have the same problem, but none of them have worked for me. But yeah, this error pops up after resetting your character. Any solutions to fix this?

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local IdleAnim = character:WaitForChild("Humanoid"):LoadAnimation(game.ReplicatedStorage.Animations.Combat.CombatldleAnim)