Currently, I’m attempting to utilize ReplaceBodyPartR15()
and BuildRigFromAttachment()
to replace the player’s body parts with custom meshes for customization. At the moment, there’s multiple issues that I need help with:
- Replacing the LowerTorso does not actually replace the LowerTorso in the character’s hierarchy for whatever reason, and with
BuildRigFromAttachment()
in play, things break with the rig’s joints. I can’t remove the LowerTorso either, else the rig falls apart and breaks. A picture showing the heirarchy is below:
- Because of issue #1, the legs only follow the animation from the actual lower torso, not the replacement:
3: This seems to have been an issue since 2020, considering this bug report hasn’t had any actual progress made on it, but attempting to add a StarterHumanoid with Automatic Scaling disabled completely breaks the player, which is a bug that needs fixing since otherwise the player will be sliding around without proper HipHeight scaling that doesn’t seem to change in the script.
local Players = game:GetService("Players")
local ServStor = game:GetService("ServerStorage")
local function onCharacterAdded(character)
--ServStor.starterlegs.StarterLegs_LowerTorso.Joint.Part1 = character.HumanoidRootPart
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.LowerTorso,ServStor.starterlegs.StarterLegs_LowerTorso)
--character.StarterLegs_LowerTorso.Joint.C0 = CFrame.new(0,1,0)
--character.UpperTorso.Waist.Part0 = character.StarterLegs_LowerTorso
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.LeftUpperLeg,ServStor.starterlegs.StarterLegs_LeftUpperLeg)
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.RightUpperLeg,ServStor.starterlegs.StarterLegs_RightUpperLeg)
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.LeftLowerLeg,ServStor.starterlegs.StarterLegs_LeftLowerLeg)
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.RightLowerLeg,ServStor.starterlegs.StarterLegs_RightLowerLeg)
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.LeftFoot,ServStor.starterlegs.StarterLegs_LeftFoot)
character.Humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.RightFoot,ServStor.starterlegs.StarterLegs_RightFoot)
character.Humanoid:BuildRigFromAttachments()
--character.Humanoid.AutomaticScalingEnabled = false
character:WaitForChild("Humanoid").HipHeight = 7.8
end
local function onPlayerAdded(player)
-- Check if they already spawned in
if player.Character then
onCharacterAdded(player.Character)
end
-- Listen for the player (re)spawning
player.CharacterAdded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)