I want to keep checking if my tool, pistol, is in the character. Here's the script I tried to make:
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
while true do
wait(1)
for i, v in pairs(character:GetChildren()) do
if v.Name == "Pistol" then
print("Pistol found")
end
end
end
end)

2 comments
do you want to check if it's equipped?
yes