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-sizing multi-part models?

Previous Thread :: Next Thread 
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
03 Apr 2012 03:45 PM
I've seen scripts that "shrink" a gun model, but I don't really understand the logic behind it. Could someone help me out? Because I would like to make a tool/script that scales models on a certain axis (x,y, or z, instead of all three at the same time)
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
03 Apr 2012 03:50 PM
Most of the re-sizing models just find a point, preferably 0,0,0, and then make each piece scale by the amount, for example, if it's a 12x15x18 brick at 6,3,9 and you wanted to get it a third of its size, you would make the brick 4x5x6, and the position would be 2,1,3.
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
03 Apr 2012 03:51 PM
Try something like this (not this however)

xscale=1
yscale=1
zscale=1
model = workspace.Model:GetChildren()
for i=1, #model do
if model[i].className == "Part" then
model[i].Size=model[i].Size+Vector3.new(model[i].Size.x*xscale,model[i].Size.y*yscale, model[i].Size.z*zscale)
end
end
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
03 Apr 2012 03:52 PM
That's pretty much it, but you have to change the positioning of it or else your model will have a bunch of gaps.
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
03 Apr 2012 03:54 PM
Yeah the re-sizing I understand, it's the re-positioning that confuses me
Report Abuse
ServerLabs is not online. ServerLabs
Joined: 29 Dec 2010
Total Posts: 2263
03 Apr 2012 03:56 PM
Same method.
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
03 Apr 2012 04:04 PM
I'm pretty sure it's not the same method
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
03 Apr 2012 05:10 PM
Anybody? How do I do this?
Not all parts will move the same amount... Will picking any origin vector position suffice or does it have to be exact center of model?
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