bin = script.Parent ItemName = "Darkheart" WaitTime = 5 Item = bin:FindFirstChild(ItemName) backup = Item:Clone() function regen() local regen = backup:clone() regen.Parent = bin end debounce = false function onTaken(property) if (debounce == true) then return end debounce = true if (bin:FindFirstChild(ItemName) == nil) then wait(WaitTime) regen() end debounce = false end Item.Changed:Connect(onTaken)
There is a easier way to do this
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) -- do the clone script end end)