R15 To R6 Support

I’m trying to edit a pre-made script for R6. In this script it uses the function ReplaceBodyPartR15 but there’s no ReplaceBodyPartR6. How could I replicate this function for a R6 character? Please help.

Code:

local players = game:GetService("Players")

local Rig = script.ClassicS15_Parts

players.PlayerAdded:Connect(function(plr)
	plr.CharacterAppearanceLoaded:Connect(function(char)
		local humanoid = char:FindFirstChildWhichIsA("Humanoid")

		if humanoid and humanoid.Health > 0 then
			for _, part in ipairs(Rig:GetDescendants()) do
				if part:IsA("BasePart") then
					humanoid:ReplaceBodyPartR15(part.Name, part:Clone())
				end
			end
		end
	end)
end)

why not go roblox setting then change R15 to R6?

No like. I’m trying to replace the bodyparts. Cause I made a custom R6 Character. I wanna keep all the accessories and clothing. So I want too replace the current bodyparts with the new ones

try reload the character to r6