|
| 22 May 2016 08:59 AM |
| How would one find the correct coordinates when you'd like to cut two parts? I'm trying to make a saw wich cuts the part in two. |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 22 May 2016 09:03 AM |
Basic logic:
local partThatWillBeCut = workspace.Part
local pos = partThatWillBeCut.Position
local half1 = Instance.new("Part") half1.CFrame = partThatWillBeCut.CFrame + Vector3.new(pos.X + partThatWillBeCut.Size.X, 0, pos.Z + partThatWillBeCut.Size.Z)
local half2 = Instance.new("Part") half2.CFrame = partThatWillBeCut.CFrame - Vector3.new(pos.X + partThatWillBeCut.Size.X, 0, pos.Z + partThatWillBeCut.Size.Z)
half1.Parent = workspace half2.Parent = workspace |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 22 May 2016 09:04 AM |
I'm sorry, I ment:
pos.X + partThatWillBeCut.Size.X/4, 0, pos.Z + partThatWillBeCut.Size.Z/4 |
|
|
| Report Abuse |
|
|
pketny
|
  |
| Joined: 27 Dec 2010 |
| Total Posts: 1162 |
|
|
| 22 May 2016 09:06 AM |
Ignore that...
I ment this:
Vector3.new(partThatWillBeCut.Size.X/4, 0, 0)
Sorry for the corrects...
This is assuming that the part will be cut through the Z axis. |
|
|
| Report Abuse |
|
|