This is how you for loop it
EDIT:
Admins want me to explain my code.
Instead of changing each and every single part on the player one by one. It's more efficient to use a For Loop to change them for you instead. Also, it is more convenient to just loop with a player:GetChildren() and change for parts.
for _,v in pairs(player:GetChildren()) do
if not v:IsA('Part') then return end
end
But doing that means any part that gets grouped in the player will also be affected. Therefore, putting the names of the parts in a table is a fine method.
local CharParts = {"Right Arm", "Right Leg", "Left Arm", "Left Leg", "Head", "Torso"}
for i = 1, #CharParts do
end
More importantly, you need to define the part using :FindFirstChild() and to change the parts' size below Vector3.new(1,1,1) , you got to change their FormFactor to Custom. Then you can change it to Vector3.new(.35,.35,.35) and above.
local Part = player.Character:FindFirstChild(CharParts[i])
Part.FormFactor = "Custom"
This is the final tested code:
local player = game.Players.LocalPlayer
local CharParts = {"Right Arm", "Right Leg", "Left Arm", "Left Leg", "Head", "Torso"}
for i = 1, #CharParts do
local Part = player.Character:FindFirstChild(CharParts[i])
Part.FormFactor = "Custom"
Part.Size = Vector3.new(0.4, 0.8, 0.4)
end
There you go I think I explained every single part of the final code.
3 comments
I would suggest using a for loop btw
Come on PreyStar, don't be like that. You know mine is correct
The innate problem with changing your body part's size is the welds. It's not as simple as you may think. However, the correct format for your lines are: player.Character[CharParts[1]].Size. Since CharParts[1] is a string, we have to use brackets.