Player.Character returns the death character

hey guys I am making a gun system and for some reason, Player.Character returns the death character :man_shrugging:

this is what i’m doing;

function Base.new(tool,Configurations,UWU)
	local self = setmetatable({},Base)
	if (not Player:HasAppearanceLoaded()) then
		Player.CharacterAppearanceLoaded:Wait()
	end
        self.Animations = self:LoadAnimations(tool);
	return self;
end;

So when I run self:LoadAnimations (this code:)

function Base:LoadAnimations(tool)
	local Animations = tool.Animations:GetChildren()
	local toReturn = {}
	
	print(Player.Character.Humanoid.Health)
	
	if (Player.Character.Humanoid and Player.Character.Humanoid.Health > 0) then
		print("Loading animations!")
		for index,animation in pairs(Animations) do
			toReturn[animation.Name] = Player.Character.Humanoid:LoadAnimation(animation)
		end;
	end;
	return toReturn
end

When you first join it works, when you die it keeps printing humanoid health is 0
even though I’m doing Player.Character.Humanoid
I don’t even know how it isn’t working :man_shrugging:
let me show you:
(it prints twice because of 2 guns haha)

I fixed it by doing this.

function Base:LoadAnimations(tool)
	local Animations = tool.Animations:GetChildren()
	local toReturn = {}

	print("Loading animations!")
	
	while (true) do
		if (Player.Character.Humanoid:IsDescendantOf(workspace)) then
			break
		end
		wait()
	end
	
	for index,animation in pairs(Animations) do
		toReturn[animation.Name] = Player.Character.Humanoid:LoadAnimation(animation)
	end;
	return toReturn
end

But

Shouldn’t this check:

if (not Player:HasAppearanceLoaded()) then
		Player.CharacterAppearanceLoaded:Wait()
	end

make it work properly?
Because when :LoadAnimations Humanoid is not descendant of workspace.

So character is loaded but Humanoid is not descendant of workspace???