|
| 18 Jul 2014 02:16 AM |
function divide(part) part:remove() for i = 1, 4 do p = Instance.new("Part", workspace) p.Position.Y = part.Position.Y p.Anchored = true p.Size.X = part.Size.X / 4 p.Size.Z = part.Size.Z / 4 p.Size.Y = part.Size.Y / 4 p.Position = Vector3.new() -- Now, this is the part. end end
What I'm trying to create here is a function that divides a part into 4.. However, I don't want it so the 4 parts go to the exact center position of the original part, but so that it looks like the original part but it's in 4 pieces and they're properly positioned. |
|
|
| Report Abuse |
|
|
| |
|
Tynexx
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 1559 |
|
|
| 18 Jul 2014 02:20 AM |
Maybe: p.Position = Vector3.new(part.Position.X/4, part.Position.Z/4, part.Position.Y/4)) Probably wont work. ~Tynexx |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2014 02:21 AM |
Wouldn't work because ex: Part is at 16,16,16 new part will be at 4,4,4 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
| |
|
Tynexx
|
  |
| Joined: 11 Jul 2012 |
| Total Posts: 1559 |
|
|
| 18 Jul 2014 02:23 AM |
Then change /4 to /8? ~Tynexx |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2014 02:25 AM |
128GB I want them so that they're properly positioned.
|
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 18 Jul 2014 02:26 AM |
Accounting for rotation will be the hardest part of this Its probably not all that hard but everything I know I learned from wanting to make something that needed it, so I learned it, I haven't done much with CFrame
If the blocks never going to be rotated it should be easy though |
|
|
| Report Abuse |
|
|
|
| 18 Jul 2014 02:28 AM |
They don't need to be rotated. Let me explain it better. I have a part, laying on the ground. It's 4x1x4. I want it to it creates 4 parts, 1x1x1, positioned so that they're next to each other making it look like it's 4x1x4. Just basically divide the original part.
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 18 Jul 2014 02:40 AM |
Sorry for the mass bumping. qq |
|
|
| Report Abuse |
|
|
| |
|