Traill attachments not working

Trail.Attachment1 and Trail.Attachment0 don’t work and I don’t know why
Whenever I set them, they’re not actually set. They’re only set server-side and even then the trail doesn’t appear.

Heres the code

function module:SetUp(model, character)
	local cosmeticItems = model:GetDescendants()
	
	for _, item in next, cosmeticItems do
		if item:GetAttribute('Cosmetic') then
			local parent = item.Parent.Name
			local parentObj = character:FindFirstChild(parent, true)
			local obj = item:Clone()
			
			if parentObj then
				obj:SetAttribute('Cosmetic', model.Name)
				obj.Parent = parentObj
				
				if obj:GetAttribute('Attachment0') then
					for _, attach in next, model:GetDescendants() do
						if attach.Name == obj:GetAttribute('Attachment0') then
							obj.Attachment0 = attach
							print(obj.Attachment0)
						end
					end
				end
				
				if obj:GetAttribute('Attachment1') then
					for _, attach in next, model:GetDescendants() do
						--print(attach.Name, obj:GetAttribute('Attachment1'))
						if attach.Name == obj:GetAttribute('Attachment1') then
							obj.Attachment1 = attach
							print(obj.Attachment1)
						end
					end
				end
				
				--model.DescendantAdded:Connect(function(attach)
				--	if attach.Name == obj:GetAttribute('Attachment0') and attach:GetAttribute('Cosmetic') == model.Name then
				--		obj.Attachment0 = attach
				--	end
					
				--	if attach.Name == obj:GetAttribute('Attachment1') and attach:GetAttribute('Cosmetic') == model.Name then
				--		obj.Attachment1 = attach
				--	end
				--end)
			end
		end
	end
end

Please help & thanks