hey guys I am making a gun system and for some reason, Player.Character returns the death character
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
let me show you:
(it prints twice because of 2 guns haha)