Hi everyone!
-
What do you want to achieve? I made an item in the shop but I want it not to spawn it in everyones inventory when the round starts.
-
What is the issue? The script works once but when you die, it wont come back.
-
What solutions have you tried so far? I added a print but it doesn’t get me anywhere farther as it still prints when it doesn’t put it into my inventory.
My script is below.
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
wait(5)
for i,e in pairs(player.OwnedItems:GetChildren()) do
e:Clone().Parent = player.Backpack
print("placed "..e.Name.." into "..player.Name.."'s backpack after death")
end
end)
end)
end)
Thanks!