|
| 11 Mar 2014 04:22 PM |
I'm making a block generator thing, and each part is not the size I want it to be. When I create a new part, I give this size:
p.Size = Vector3.new(5, 5, 5)
but it comes out to
5, 4.8, 5
I've tried all the form factors and this is still happening.... What am I doing wrong? |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:23 PM |
It's form factor needs to be custom.
p.FormFactor = Enum.FormFactor.Custom
something like that
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:36 PM |
| It's still coming out to a Y size of 4.8 |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:36 PM |
Here is the script if it will help:
local length, width, height = 10, 10, 10
local brick = {}
--Properties brick.delayTime = 0.03 brick.Name = "Brick" brick.Size = {5, 5, 5} brick.Color = BrickColor.new("Black") brick.Anchored = true brick.FormFactor = Enum.FormFactor.Custom
for l = 1, length do for w = 1, width do for h = 1, height do wait(brick.delayTime) local p = Instance.new("Part", Workspace) p.Name = brick.Name p.Anchored = brick.Anchored p.BrickColor = brick.Color p.Size = Vector3.new(brick.Size[1], brick.Size[2], brick.Size[3]) p.Position = Vector3.new(l * brick.Size[1], h * brick.Size[2], w * brick.Size[3]) p.FormFactor = brick.FormFactor end end end |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:38 PM |
you need to set the form factor before you set the size.
#nerdsunited |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:39 PM |
Oh, now I feel stupid..
Thanks, :D |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:50 PM |
The Form Factor can also be changed using numbers: p.FormFactor = Enum['2']
Something like that. I'm pretty sure what I've written just now is wrong though. I'm just saying there's another way, not that it's more efficient or anything. |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:54 PM |
You can use a string to do it too.
p.FormFactor = "Custom" |
|
|
| Report Abuse |
|
|
|
| 11 Mar 2014 04:57 PM |
Pretty sure that's the least time consuming and better than all of us...
O)_O) |
|
|
| Report Abuse |
|
|