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 » Scripters
Home Search
 

Re: resizing

Previous Thread :: Next Thread 
Tripane is not online. 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 is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Dec 2014 04:36 PM
How do you do the latter?
Report Abuse
128GB is not online. 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 is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Dec 2014 04:42 PM
Thanks!
Report Abuse
128GB is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. Tripane
Joined: 03 Jun 2011
Total Posts: 11432
28 Dec 2014 04:59 PM
Thanks!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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