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)