How to use debris service

Im trying to make a part that destroys certain models on touch, but it isn’t working.

Script I made:

script.Parent.Touched:Connect(function(hit)
	if hit and hit.Parent.Name == "R6" then
		local debris = game:GetService("Debris")
		debris:AddItem(hit.Parent)
	end
end)```

you’ve gotta add the lifetime number as the second variable:

script.Parent.Touched:Connect(function(hit)
	if hit and hit.Parent.Name == "R6" then
		local debris = game:GetService("Debris")
		debris:AddItem(hit.Parent,1)
	end
end)

I copy and pasted your script and it is still not working

script.Parent.Touched:Connect(function(hit)
		local debris = game:GetService("Debris")
		debris:AddItem(hit.Parent,1)
end)

Why don’t you just use the Destroy method of the Instance? Debris Service is used when you want destroy an Instance without throttling.

The second argument isn’t necessary, it will return 0 automaticly :+1:

it works for me :person_shrugging: