If Name == Value then statement not working

I want to add a kill system that when a player gets killed, a value inside the player called “Kills” is added by 1, and the player who is killed has their killed value in another folder. However, when the if v.Name == character.Humanoid.creator.Value then statement is true, it doesn’t print the period nor add the kill.


1 Like

creator is traditionally an ObjectValue. Is that what you are using? If so, it’s as easy as this.

if character:FindFirstChild("Humanoid") --[[ if character.Humanoid will actually error, use FindFirstChild ]] and character.Humanoid:FindFirstChild("creator") then
    if character.Humanoid.Creator.Value:FindFirstChild("Kills") then
        character.Humanoid.Creator.Value.Kills.Value += 1

Yes, the creator is a ObjectValue, but I’m trying to find the killer name in the workspace using the value of the ObjectValue, which is set as the killers name.
The Kills value isn’t inside of the ObjectValue it’s inside of the character.

Got string value and object value mixed. I know what to do now