Hello
I want to scale my custom character with a vector3 value like vector3.new(0.5, 0.5, 0.5) and scale the caharacter acordingly. But i have no idea how i could achieve this.
Any suggestion would be greatly appreciated!
Hello
I want to scale my custom character with a vector3 value like vector3.new(0.5, 0.5, 0.5) and scale the caharacter acordingly. But i have no idea how i could achieve this.
Any suggestion would be greatly appreciated!
local char = script.Parent -- Character
local Resize = function(Target, x,y,z) -- Target = Part, xyz = 0,0,0 for example
Target.Size = Vector3.new(x,y,z)
end
-- Basically do this > Resize(Part, 1,1,1)
for i,v in pairs(char:GetChildren()) do
if v:IsA("BasePart") then
if v.Name == string.match(v.Name, "Leg") then
print(v.Name.." its leg!")
Resize(v, 1,3,2.5)
elseif v.Name == string.match(v.Name, "Torso") or v.Name == string.match(v.Name, "HumanoidRoot") then
print(v.Name.." its torso!")
Resize(v, 0.5,3,3)
elseif v.Name == string.match(v.Name, "Arm") then
print(v.Name.." its arm!")
Resize(v, 0.5,3,3)
end
end
end