Welding objects on a R6 and R15 body?

I’m attempting to weld a bracelet onto a player’s arm and want it to be versatile for both R6 and R15. The issue is that both bodies carry different naming conventions, so I need to be able to know which type the player has on in order to access the arm properly.

How I’m accessing the arm for both body types:
R15: local player = game.Players.LocalPlayer.Character:WaitForChild("RightLowerArm")
R6: local player = game.Players.LocalPlayer.Character:WaitForChild("RightArm")

How can I identify the player’s body type?

My assumption in pseudo code:

If can’t identify “RightLowerArm” then
search for “RightArm”

^ Something like this? Still working it out in my head.

You can use Humanoid.RigType. This will either be Enum.HumanoidRigType.R6 or Enum.HumanoidRigType.R15.

4 Likes

Also worth noting that the naming convention for R6 utilizes whitespace. Ex: “Right Arm” instead of “RightArm”. So indexing it like r6["Right Arm"] would be correct.

3 Likes
local PlayerS = game:GetService('Players');
	local plr = PlayerS.LocalPlayer;
		local Cha = plr.Character or plr.CharacterAdded:wait();
			local Hum = Cha:WaitForChild('Humanoid');
			local RightArm = Cha:FindFirstChild('RightLowerArm') or Cha:FindFirstChild('Right Arm');


local function WeldItem_Func(Item)
	--[[
		Weld Stuff
	--]]
end;

1 Like