My spawner isnt respawning model?

I made a spawner that spawns like a model full of parts, but whenever the model would spawn, it wouldnt remove the old clone, and spawn a new one

local ReplicatedStorage = game.ReplicatedStorage
local Cashitem = ReplicatedStorage:WaitForChild('CASH SPAWN1')
local DropperPart = workspace.Spawners:WaitForChild('Spawn')


while wait(math.random(5,10)) do
	local Newcash = Cashitem:Clone()
	Newcash.Parent = workspace
	Newcash.CFrame = workspace.CFrame
	game:GetService'Debris':AddItem(Newcash, 5)
end

so for some reason the script doesnt remove the clone that was put in then put a new one, idk if i did something wrong

Any help would be great!

U didn’t make a function to destroy it.
Add this:

Cashitem:Destroy()

Let me know if u need more help!

But this line is suppose to delete the model in 5 seconds

game:GetService'Debris':AddItem(Newcash, 5)

my problem is that it doesnt work

Oops, i did a Cframe for a model, its good now

1 Like