I wanted to call a function to see if there was a tool in the character. However, the function returns false even though I checked and the tool was in the character.
function checkforTool()
for _,tool in ipairs(plr.Character:GetChildren()) do
if tool:IsA("Tool") then
return true
else
return false
end
end
end
Don't worry about missing variables, I'm just trying to get to the point. Am I using the for loop correctly?

1 comment
You could just return tool:IsA("Tool") by the way.