I am making a groundslam ability and the debris the attack causes is supposed to have the same material and color of the nearby parts. It works with cancollide unanchored parts but it not working with a cancollide anchored part

script.parent.Touched:Connect(function(closeobj)
	if closeobj.Parent:FindFirstChild("Humanoid") then return end
	if closeobj:IsA("BasePart") then
		script.Parent.BrickColor = closeobj.BrickColor
		script.Parent.Material = closeobj.Material
		script.Parent.ParticleEmitter.Color = closeobj.Color3
	end
end)