Character recreated on parent

I think it is reasonable to say that the expected behavior is, when CharacterAdded is called, the body parts inside of the character parameter are not just placeholders

However, the code below shows that the body parts that exist when CharacterAdded is called are not the same as the ones that exist when the character is parented to workspace (and wears a package as @byc14 clarified)

game:GetService'Players'.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local r1=char:WaitForChild('RightFoot',20)
		assert(not char.Parent,'too slow, try again')
		char.AncestryChanged:Wait()
		local r2=char:WaitForChild('RightFoot',20)
		wait(1)
		print(r1==r2)--outputs "false", expected "true"
		print(r1:GetFullName())--outputs "RightFoot", expected "Workspace.Acreol.RightFoot"
		print(r2:GetFullName())--outputs "Workspace.Acreol.RightFoot", expected "Workspace.Acreol.RightFoot"
	end)
end)
1 Like

Maybe it’s been fixed? I just tested this in an empty place (in play solo and in a local test server) and it gave the expected output.

roblox might have forgotten to fix it for me then

I just tested it in an essentially blank place in online mode for both R6 and R15 character models (though I had to change it to ‘Right Leg’ for R6) and r1 == r2 printed true both times.

Are you testing in a blank place (ex maybe you have a script that is impacting this?)
Are there any options you’ve changed that might make a difference (ex maybe the bug only shows up if CharacterAutoLoads is false or something)?
Are you only testing in Play Solo or some other run mode? What are you running the test on (Windows/Mac/other)?

It’s R15 specific. When an R15 character spawns, the descendants are parented to nil (not :Destroy()ed, since they aren’t locked) and new ones are created.

R15

  RightFoot removed
  RightFoot added
  RightLowerLeg removed
  RightLowerLeg added
  RightUpperLeg removed
  RightUpperLeg added
  LeftFoot removed
  LeftFoot added
  LeftLowerLeg removed
  LeftLowerLeg added
  LeftUpperLeg removed
  LeftUpperLeg added
  UpperTorso removed
  UpperTorso added
  LowerTorso removed
  LowerTorso added
  LeftUpperArm removed
  LeftUpperArm added
  LeftLowerArm removed
  LeftLowerArm added
  LeftHand removed
  LeftHand added
  RightUpperArm removed
  RightUpperArm added
  RightLowerArm removed
  RightLowerArm added
  RightHand removed
  RightHand added
  Handle added (x2)

R6

  Handle added (x2)

Result

  RightFoot
  Workspace.byc14.RightFoot
  RightLowerLeg
  Workspace.byc14.RightLowerLeg
  RightUpperLeg
  Workspace.byc14.RightUpperLeg
  LeftFoot
  Workspace.byc14.LeftFoot
  LeftLowerLeg
  Workspace.byc14.LeftLowerLeg
  LeftUpperLeg
  Workspace.byc14.LeftUpperLeg
  UpperTorso
  Workspace.byc14.UpperTorso
  LowerTorso
  Workspace.byc14.LowerTorso
  LeftUpperArm
  Workspace.byc14.LeftUpperArm
  LeftLowerArm
  Workspace.byc14.LeftLowerArm
  LeftHand
  Workspace.byc14.LeftHand
  RightUpperArm
  Workspace.byc14.RightUpperArm
  RightLowerArm
  Workspace.byc14.RightLowerArm
  RightHand
  Workspace.byc14.RightHand
  Workspace.byc14.RedPlaidBandFedora.Handle
  Workspace.byc14.GlassesBlackFrame.Handle

You can see for yourself using:

game:GetService("Players").PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local tbl = {}
		Character.DescendantAdded:Connect(function(d)
			if not d:IsA("BasePart") then return end
			table.insert(tbl, d)
			print(d.Name .. " added")
		end)
		Character.DescendantRemoving:Connect(function(d)
			if not d:IsA("BasePart") then return end
			table.insert(tbl, d)
			print(d.Name .. " removed")
		end)
		wait(2.5)
		for _, v in pairs(tbl) do
			print(v:GetFullName())
		end
	end)
end)
1 Like

Interesting. I’ve run the script you showed for both R6 and R15 forced character models in both play solo and online modes for both an old place and a brand new one and the only output I get in each case is “Handle added” followed shortly after by its full path.

1 Like

I think you need to wear a package. It seems the bodyparts are being loaded out in place for your packages, i.e for me it’s the city man life package. Only seems to happen with R15 though.

2 Likes

I think this is related to how calling humanoid:ApplyDescription(description) creates new instances for the body parts if they have different mesh ids… I find that also undesirable, but if it’s here to stay (perhaps if Roblox wanted developers to support avatars with different joints?), could that be clarified?

1 Like

Still happening and annoying to deal with

Couldn’t you use Player.CharacterAppearanceLoaded instead?

1 Like