generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: For Loop Size increase

Previous Thread :: Next Thread 
yobo89 is not online. 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 is not online. 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 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
15 Jun 2014 07:52 AM
Doesn't work with other numbers anyway
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
15 Jun 2014 07:53 AM
Vector3
Multiply by a number other than one or add it instead.
Report Abuse
Vehkter is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
15 Jun 2014 08:10 AM
Nope
Report Abuse
yobo89 is not online. yobo89
Joined: 05 Jun 2010
Total Posts: 2341
15 Jun 2014 08:16 AM
B1
Report Abuse
Vehkter is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image