Hello, and thank you in advance for any help provided. I recently asked a question about changing the size of all parts under a workspace's parent folder. This code below works perfect!
for i,v in pairs(workspace.SpecialParts:GetChildren()) do if v:IsA("BasePart") then v.Size = Vector3.new(10,10,10) end end
But I realized I need to change the parts location too. I already have the XYZ coordinates but I am confused how to input it into the code above so it changes both the size and coordinates of 'part'. Instead of just the part size. Any help is greatly appreciated.
Thanks a ton!
For the parts location you need to change the Position of the part. The Position of a part is also a vector3, and since you have the X,Y,Z Co-ordinates, it's simply:
for i,v in pairs(workspace.SpecialParts:GetChildren()) do if v:IsA("BasePart") then v.Size = Vector3.new(10,10,10) v.Position = Vector3.new(X,Y,Z) -- position end end