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: Resizing Bricks

Previous Thread :: Next Thread 
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Jun 2014 11:51 PM
How do I get this to shrink? Like shrink then when its so small u cant see...

function onTouched(hit)
local doors = script.Parent.Parent.Parent.Doors
local door1 = doors.door1
local door2 = doors.door2
repeat
door1.Size.X
door1.Size.Y
door1.Size.Z
until door1.Size.X == 0
end

script.Parent.Touched:connect(onTouched)

Thats as far as I got...
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
05 Jun 2014 11:52 PM
door1.Size = door1.Size-Vector3.new(1,1,1)
wait()
until door1.Size.X<=0
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
05 Jun 2014 11:54 PM
function onTouched(hit)
local doors = script.Parent.Parent.Parent.Doors
local door1 = doors.door1
local door2 = doors.door2
repeat
wait()
door1.Size = door1.Size - Vector3.new(.1, .1, .1)
until door1.Size == Vector3.new(.2, .2, .2) -- .2 is lowest if brick is custom
--code for when door is small
end
Report Abuse
kubuto2 is not online. kubuto2
Joined: 16 Jul 2008
Total Posts: 1275
06 Jun 2014 12:24 AM
function onTouched(hit)
local doors = script.Parent.Parent.Parent.Doors
local door1 = doors.door1
local door2 = doors.door2
repeat
wait()
door1.Size = door1.Size - Vector3.new(.1, .1, .1)
until door1.Size == Vector3.new(.2, .2, .2)
-- .2 is lowest if brick is custom so we must put a mesh in it!
local mesh = Instance.new("BrickMesh", door1)
repeat wait()
mesh.Scale = mesh.Scale - Vector3.new(.1, .1, .1)
until mesh.Scale == Vector3.new(0, 0, 0)

end
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