|
| 06 May 2013 05:48 AM |
Can someone give me the code for this? -- if script.Parent.size is bigger than 1 then end |
|
|
| Report Abuse |
|
|
|
| 06 May 2013 05:54 AM |
| use the size.x,y,z properties |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 06 May 2013 06:10 AM |
function Check(Obj) if Obj.Size.X > 1 then print("Object Size.X is higher then 1") elseif Obj.Size.Y > 1 then print("Object Size.Y is higher then 1") elseif Obj.Size.Z > 1 then print("Object Size.Z is higher then 1") else print("No Object was higher then 1") end end
Check(Game:GetService("Workspace").Part)
|
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 06 May 2013 06:52 AM |
size1 = brick1.Position.X + brick1.Position.Y + brick1.Position.Z
size2 = brick2.Position.X + brick2.Position.Y + brick2.Position.Z
if brick1 > brick 2 then print("Brick 1 is larger.")
if brick1 < brick 2 then print("Brick 2 is larger.")
if brick1 == brick 2 then print("Brick 1 and Brick 2 are the same size.")
I think this will work. |
|
|
| Report Abuse |
|
|
doneyes
|
  |
| Joined: 21 Mar 2008 |
| Total Posts: 3466 |
|
|
| 06 May 2013 06:53 AM |
| Whoops, change position to Size. I didn't mean to put that there. |
|
|
| Report Abuse |
|
|
|
| 06 May 2013 07:01 AM |
if script.Parent.Size = Vector3.new(1, 1, 1) then //Script script script here else //Script here, or null... end |
|
|
| Report Abuse |
|
|
|
| 06 May 2013 09:00 AM |
Technically, if you want to talk about size, you should think of volume. Volume of a rectangular prism is width*height*depth. So the volume of any part should be:
volume = part.Size.X*part.Size.Y*part.Size.Z |
|
|
| Report Abuse |
|
|