Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 28 Dec 2014 04:31 PM |
so I have this thing
local part = script.Parent for i = 5, 1, -1 do part.Size = part.Size - Vector3.new(0, 1, 0) end
This resizes the part from the bottom and top to the center, I only want it to resize from the top down. Help? |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 28 Dec 2014 04:35 PM |
Well you could do math to reposition the part after resizing it or
http://wiki.roblox.com/index.php?title=API:Class/BasePart/Resize |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 28 Dec 2014 04:40 PM |
local part = Instance.new("Part", workspace) part.FormFactor = Enum.FormFactor.Custom part.Size = Vector3.new(4, 25, 4)
for _ = 1, 20, 1 do part.Size = (part.Size - Vector3.new(0, 0.5, 0)) part.CFrame = (part.CFrame - Vector3.new(0, 0.5, 0)) wait() end |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 28 Dec 2014 04:42 PM |
| (Psst 128 he totally said latter not former) |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 28 Dec 2014 04:45 PM |
Oops
local part = Instance.new("Part", workspace) part.FormFactor = Enum.FormFactor.Custom part.Size = Vector3.new(4, 25, 4)
for _ = 1, 10, 1 do part:Resize(Enum.NormalId.Top, -1) wait() end |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 28 Dec 2014 04:47 PM |
That didn't work.
And with the first one, the part's CFrame glitches out when a player touches it while it's being resized. |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 28 Dec 2014 04:51 PM |
local part = Instance.new("Part", workspace) part.Anchored = true part.FormFactor = Enum.FormFactor.Custom part.Size = Vector3.new(4, 25, 4)
local start = part.CFrame
for _ = 1, 20, 1 do part.Size = (part.Size - Vector3.new(0, 0.5, 0)) start = (start - Vector3.new(0, 0.5, 0)) part.CFrame = start wait() end |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 28 Dec 2014 04:52 PM |
And the second one did work
The first one glitched because I forgot roblox acts weird when a part touching something it resized |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|