How do I call player character body part more efficiently?

Is there a way to call a Player Character Body Parts for R15 and R6 instead of making a table for all the body parts like I’m doing?

1 Like

What does your script plan to do with the body parts?

1 Like

You mean like calling 1 part if yes here is the code

local Char =game.players.localPlayer.Character 

Local LeftArm = Char:FindFirstChild(“Left Arm”) — R6
2 Likes

I plan to use the body parts to change color under certain conditions.

1 Like

Hey! I think if you want to change the color of the character, you can juse use the “Body Colors” that every player has in their character when they spawn.

However, if you wish to do it with code, you may use this:

for _, part in pairs(player.Character:GetDescendants()) do
	if part:IsA('BasePart') then
		-- Your code here
	end
end```
3 Likes

Thats exactly what I was trying to look for! Thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.