klamman
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 436 |
|
|
| 26 Dec 2015 02:51 AM |
I know that the position of a part (and rotation, but I need to learn how to use that, still) is changeable by manipualting the CFrame property of bricks, which will ignore CanCollide. Is there a similar way to do this with size?
|
|
|
| Report Abuse |
|
|
|
| 26 Dec 2015 06:04 AM |
you would have to save the cframe to a variable, change the size and then apply that cframe again, like this:
local cf = part.CFrame part.Size = Vector3.new(10, 10, 10) part.CFrame = cf |
|
|
| Report Abuse |
|
|
klamman
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 436 |
|
|
| 26 Dec 2015 06:52 PM |
Alright, thanks, that makes sense. Reestablishing the CFrame every time the size increases so that the brick itself doesn't move, correct? Now my problem is this: Since the brick ignores CanCollide, its size increases on both sides - increasing both upwards and downwards, and therefore through the baseplate. Is there any way to prevent this, and make the brick's size only increase upwards? |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 26 Dec 2015 07:24 PM |
| part.CFrame = oldcframe + Vector3.new(0,ysizeincrease/2,0) |
|
|
| Report Abuse |
|
|
klamman
|
  |
| Joined: 06 Feb 2010 |
| Total Posts: 436 |
|
|
| 26 Dec 2015 07:46 PM |
| Thanks Vlek, works perfectly. It shifts the position, I don't suppose there's a way to achieve the desired effect without changing the position? If not, can someone explain why this works? Thanks in advance, and sorry for all of the questions, haha. |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 26 Dec 2015 07:52 PM |
| Nope, as a part's size changes it's position has to change too unless you want it to increase on all sides, which isn't what you want. |
|
|
| Report Abuse |
|
|