I would like to print something when a tool in the players backpack has the same name as a number. The issue is that when i try to check if the tool has the same name as the number nothing gets printed.
Here is the script that i have made
winner = 1
for _,player in pairs(players:GetPlayers()) do
local tool = player.Backpack:FindFirstChildWhichIsA('Tool') or player.Character:FindFirstChildWhichIsA('Tool')
print('player has tool') --this gets printed
if tool.Name == winner then --I have also tried -> if tool == winner then
print('zoo wee mama') --this does not
end
end