--freeze the character

DisableMove()

IceForm = Instance.new("Sound")
IceForm.Name = "IceForm"
IceForm.SoundId = "rbxassetid://"..formSounds[math.random(1,#formSounds)]
IceForm.Parent = Head
IceForm.PlaybackSpeed = 1
IceForm.Volume = 1.5
game.Debris:AddItem(IceForm, 10)
task.delay(0, function() IceForm:Play() end)

for i, v in pairs(charParts) do
	do
		local clone = v:Clone()
		if v.Name == "Head" and v:FindFirstChild("Mesh") then
			if pcall(function()
				return v.Mesh.MeshType == Enum.MeshType.Head
			end) then
				clone:Destroy()
				clone = game.ReplicatedStorage.Miscs.Head:Clone()
			end
		end
		clone.Massless = true
		clone:BreakJoints()
		clone.Name = "IcePart"
		clone.Color = Color3.fromRGB(128, 187, 219)
		clone.Size = clone.Size * scaleFactor * 0.95
		clone.CanCollide = false
		clone.Anchored = false
		clone.Transparency = 0.5
		clone.BottomSurface = "Smooth"
		clone.TopSurface = "Smooth"
		clone.Material = Enum.Material.SmoothPlastic
		for _, c in pairs(clone:GetChildren()) do
			if not c:IsA("DataModelMesh") then
				c:Destroy()
			elseif c:IsA("SpecialMesh") and c.MeshType == Enum.MeshType.FileMesh then
				c.TextureId = ""
				c.Scale = c.Scale * scaleFactor
				clone.Size = v.Size * scaleFactor
			end
		end
		if customPackageMeshes[string.gsub(v.Name, " ", "")] then
			local m = Instance.new("SpecialMesh")
			m.MeshId = "rbxassetid://"..customPackageMeshes[string.gsub(v.Name, " ", "")]
			m.Scale = m.Scale * scaleFactor
			m.Parent = clone
			clone.Size = v.Size * scaleFactor
		end
		clone.Parent = character
		local w = Instance.new("Weld")
		w.Parent = clone
		w.Part0 = v
		w.Part1 = clone
		table.insert(iceParts, clone)
	end
end
