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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: repeat until problem

Previous Thread :: Next Thread 
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
21 Jun 2013 01:52 AM
repeat wait(0.5) p.Size = Vector3.new(p.Size.X + 5, p.Size.Y + 5, p.Size.Z + 5) until p.Size == Vector3.new(50,50,50)

idk why it won't work

i'm trying to keep adding size until it reaches 50,50,50 but it keeps going on forever and this things size goessssssssss way too high
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
21 Jun 2013 01:58 AM
you can't compare Vector3s, you'll have to compare each axis like
until p.Size.X <= 50 and p.Size.Y <= 50 and p.Z <= 50 -- <= just in case it goes over...
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:13 AM
What does the size start off with, if the number isn't divisible by 5 then it will keep on going

@mrgames, yes you can

~ Add 6276 posts to my post count ~
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
21 Jun 2013 02:15 AM
oh usering then if i make the size start 5,5,5 is that the only way?
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:18 AM
Ok make sure what I said is true and make sure the FormFactor of the block is Symmetric, I also fixed your script to be more clean and understandable

repeat wait(0.5)p.Size = p.Size + Vector3.new(5,5,5) until p.Size == Vector3.new(50,50,50)


~ Add 6276 posts to my post count ~
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
21 Jun 2013 02:20 AM
Since when can you compare Vector3s?

print(Vector3.new(0,0,0) == Vector3.new(0,0,0))
> true

Did that change :O? I feel like something like this couldn't be done.
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:21 AM
It never wasn't a thing you couldn't do

#doublenegatives

~ Add 6276 posts to my post count ~
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
21 Jun 2013 02:23 AM
print(Vector3.new(0,0,0) >= Vector3.new(0,0,0))

That leaves an error. :'(
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
21 Jun 2013 02:24 AM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=44959199

Ahaaa.... you can't compare if a Vector3 is greater than or less than. That's what I was thinking of and where the initial thought came from :D
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:24 AM
Because you're not comparing numbers, you're comparing Vector3 values when using greater or less than signs.

~ Add 6276 posts to my post count ~
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
21 Jun 2013 02:26 AM
OH.
THAT MAKES SENSE.

*FACEPALM*

>.<
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
21 Jun 2013 02:29 AM
why exactly does it need to be symmetric?
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:32 AM
It needs to be symmetric because if you change the Y position to 5 or any whole number, it will take the number down two tenths.

So you set it at 5
ROBLOX changes it to 4.8

~ Add 6276 posts to my post count ~
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
21 Jun 2013 02:34 AM
o snap ;o
and usering

im setting the parts cframe like this

p.CFrame = char["Right Arm"].CFrame*CFrame.new(0,9,0)

is this correct, or when the part grows will it go down and get on the player
im trying to make it go 9 studs high
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
21 Jun 2013 02:36 AM
It should work if it is what you meant for it to do.

~ Add 6276 posts to my post count ~
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