Coroutine Help ( Collection Service )

I am using CollectionService to try to use only 1 script for making parts gradually turn RED then fall/UnAnchor but only work with 1 at a time so I am trying to use coroutine (Have never used before) and any help would be amazing :smiley: thank you!

Error: Can not resume dead coroutine - Client

local collectionService = game:GetService("CollectionService")

local TweenService = game:GetService("TweenService")
local TweenSpeed = 4
local TweenFunction = TweenInfo.new(TweenSpeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0)

for _, parts in pairs(collectionService:GetTagged("DropPart")) do
	local dropPart = coroutine.create(function()	
		parts.Material = "Neon"
		local OGcolor = parts.Color
		local partPosition = parts.Position
		local player = game.Players.LocalPlayer
		local color = Color3.fromRGB(255, 0, 0)
		TweenService:Create(parts, TweenFunction, {Color = color}):Play()
		wait(3.5)
		parts.Anchored = false
		wait(2)
		parts.Anchored = true
		parts.Position = partPosition
		parts.Color = OGcolor	
	end)
	parts.Touched:Connect(function()
		coroutine.resume(dropPart)
	end)
end

You don’t need coroutines for this, you can just:

local collectionService = game:GetService("CollectionService")
local TweenService = game:GetService("TweenService")
local TweenSpeed = 4
local TweenFunction = TweenInfo.new(TweenSpeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0)

for _, part in ipairs(collectionService:GetTagged("DropPart")) do
	parts.Touched:Connect(function()
		parts.Material = "Neon"
		local OGcolor = parts.Color
		local partPosition = parts.Position
		local player = game.Players.LocalPlayer
		local color = Color3.fromRGB(255, 0, 0)
		TweenService:Create(parts, TweenFunction, {Color = color}):Play()
		task.wait(3.5)
		parts.Anchored = false
		task.wait(2)
		parts.Anchored = true
		parts.Position = partPosition
		parts.Color = OGcolor	
	end)
end

part.Touched (or any RBXScriptConnection) already spawns its own thread, so you don’t have to worry about making a new thread each time.