What i want to do is to check when a player if he or she have a Shirt or Pants
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
wait(2)
if char.Pants == nil or char.Pants:IsA("Pants") then
print("Pants")
elseif not char.Shirt then
print("No Pants")
end
if char.Shirt == nil or char.Pants:IsA("Shirt") then
print("Shirt")
elseif not char.Shirt then
print("No Shirt")
end
end)
end)

1 comment
Also you can use "FindFirstChildWhichIsA" which will find a object which is a certain object type. https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChildWhichIsA