Hi Everyone! For some reason, Roblox is completely ignoring my for loop in my keep tools script shown below
game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:Connect(function() print("Keep Tools Script: " .. player.Name .. " has died") local listOfItems = player.Backpack:GetChildren() print(listOfItems == nil) -- This is false according to the output player.CharacterAdded:Connect(function(Char) print(listOfItems == nil) -- also false in the output for i = 1, #listOfItems do print("B") -- does not print in the output local item = listOfItems[i] local itemClone = item:Clone() local player = game.Players:GetPlayerFromCharacter(Char) itemClone.Parent = player.Backpack print("E") -- does not print in the output end print("Q") end) end) end) end)
listOfItems is not nil, it has the tools in it, but only the for loop in my code wont run. Any Ideas on how to fix this?
Any help is appreciated :)