yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Jun 2014 07:48 AM |
I am trying to make a circle increase in size with a for loop. Here is whati i have
for i = 1, 100 do ShotClone.Size = ShotClone.Size*Size.new(1, 1, 1) wait(0.05) end
Doesn't work.
ShotClone is the name of the part |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 15 Jun 2014 07:50 AM |
You're multiplying the size by one... It'll stay the same size. |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Jun 2014 07:52 AM |
| Doesn't work with other numbers anyway |
|
|
| Report Abuse |
|
|
|
| 15 Jun 2014 07:53 AM |
Vector3 Multiply by a number other than one or add it instead. |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 15 Jun 2014 07:53 AM |
| It would be Vector3.new(); you're attempting to call the function 'new' from nil. |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Jun 2014 08:00 AM |
for i = 1, 100 do ShotClone.Size = ShotClone.Size*Vector3.new(1.3, 1.3, 1.3) wait(0.05) end
Doesnt work |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 15 Jun 2014 08:01 AM |
ShotClone.Size is read-only, unless being written to via using Vector3; therefore, using arithmetic on it will give an error. Store 'Size' right after each loop.
for i = 1, 100 do local size = ShotClone.Size ShotClone.Size = size * Vector3.new(1.3, 1.3, 1.3) wait(0.05) end |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Jun 2014 08:03 AM |
But this works
for i = 1, 100 do ShotClone.Size = size * Vector3.new(1.5, 1.5, 1.5) wait(0.05) end |
|
|
| Report Abuse |
|
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 15 Jun 2014 08:05 AM |
| size is nil in your script, you shouldn't be able to do arithmetic on it... |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 15 Jun 2014 08:07 AM |
| I can times it by 1.5 but not anything below it |
|
|
| Report Abuse |
|
|
thetacah
|
  |
| Joined: 18 Jan 2013 |
| Total Posts: 16026 |
|
|
| 15 Jun 2014 08:07 AM |
ShotClone=script.Parent
for i = 1, 100 do ShotClone.Size = ShotClone.Size +UDim2.new(1.6, 1.5, 1.5) wait(0.05) end |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
| |
|
Vehkter
|
  |
| Joined: 09 Mar 2014 |
| Total Posts: 152 |
|
|
| 15 Jun 2014 08:22 AM |
@theta Please read my previous posts to understand why that wouldn't work. |
|
|
| Report Abuse |
|
|