FindFirstChild seems to always return nil

No matter what I attempt, FindFirstChild always returns nil

tag.Value returns correctly to what it needs to be to find the player when actually trying to find the player it just returns nil

					local killer = Players:FindFirstChild(tag.Value)
					print(tag.Value)
					print(killer) -- prints nil

FindFirstChild is only used for returning if an Instance exists, not if an Instance’s property exists.

Do this instead

local killer = Players:FindFirstChild(tag)
print(killer.Value)

What is the tags name?

Are you sure you are putting its name?

Its finding the Player with the name that the string of the value is, not the property

your solution also wouldnt work as that would look for a player named what the tag (an instance) is named

for example tag.Value would be DARKMASTER6906, then it trys to find the player named the same as that string

Is tag a StringValue or an Instance value? If it’s an Instance then change it to tag.Value.Name (but above it I would make sure it has a value)

Otherwise it should work unless Players isn’t set correctly or tag.Value isn’t correct.

It should be

local killer = Players:FindFirstChild('tag').Value

Since you are trying to find the tag and then the value and because you can’t find a player’s username inside another player themselves.

1 Like