Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does my character die when i try replacing his UpperTorso using Humanoid:ReplaceBodyPartR15()?

So basicly im trying to make a character customization for my game, but im running thought this problem(as said in the title) here is my code:


local function replaceBody(char)
	local humanoid = char:FindFirstChild("Humanoid")
	local ut = char.UpperTorso
	local torso = genderFolder:FindFirstChild(button.Name).UpperTorso:Clone()
	local motor = ut.Waist
	motor.Parent = torso
	humanoid:ReplaceBodyPartR15(Enum.BodyPartR15.UpperTorso,torso)
	motor.Part0 = char:FindFirstChild("LowerTorso")
	motor.Part1 = char:FindFirstChild("UpperTorso")
end

I get no errors it just that he dies immediately, and the motor6d destroys itself for some reason without going into the new torso, i have tried many variations of my code, ive been trying to solve this for 3 hours alrdy, so if u can help plz let me know, i would appreciate it very much

1 answer

I solved it, after 5 hours, apparently it works, u only have to do it in server that is why

This discussion is preserved as it was. New answers, comments, and votes are closed.