Me and a friend are arguing about whether or not findfirstchild is actually doing
function Instance:FindFirstChild(name)
for _, instance in ipairs(self:GetChildren()) do
if instance.Name == name then
return instance
end
end
end
or
function Instance:FindFirstChild(name)
local instance
pcall(function()
instance = self[name]
end)
return instance
end
Anybody knows the real equivalent? It indexes an instance and returns a child of that name, or nil, without erroring if the child isn’t found.