-
I wanted to make a collection service for killparts and disappearingparts.
-
The issue is that its giving me an error on the kill script when I add the disappearing parts scripts but it still works. but I don’t want this error can anyone help?
Error

Kill Script
local CollectionService = game:GetService("CollectionService")
local TaggedParts = CollectionService:GetTagged("KillPart")
for _, TaggedPart in pairs(TaggedParts) do
TaggedPart.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:WaitForChild("Head"):Destroy()
end
end)
end
Disappear Script
local CollectionService = game:GetService("CollectionService")
local TaggedParts = CollectionService:GetTagged("WrongPath")
for _, TaggedPart in pairs(TaggedParts) do
TaggedPart.Touched:Connect(function(collideOff)
if collideOff.Parent:FindFirstChild("Humanoid") then
TaggedPart.CanCollide = false
wait(6)
TaggedPart.CanCollide = true
end
end)
end
- I have looked over the hub and I have not seen any solution.
Thanks. For Helping!