|
| 25 Jun 2012 09:25 PM |
It is a simple shrinking script using Vector3.new Change the name of what is shriking to Part and what you touch to make it shrink. If you want it so that when you touch the shrinking brick it shrinks, then delete Part1 = game.workspace.Part1 and then at the last line change Part1 to Part. Hope fully this will give new scripters a better understanding to Vector3 like it did to me. (and yes this is my script and you can take it)
Part = game.workspace.Part
Part1 = game.workspace.Part1
function.onTouched(hit) Part.Mesh.Scale = Vector3.new(1400, 1400, 1400) wait(0.1) Part.Mesh.Scale = Vector3.new(1300, 1300, 1300) wait(0.1) Part.Mesh.Scale = Vector3.new(1200, 1200, 1200) wait(0.1) Part.Mesh.Scale = Vector3.new(1000, 1000, 1000) wait(0.1) Part.Mesh.Scale = Vector3.new(900, 900, 900) wait(0.1) Part.Mesh.Scale = Vector3.new(800, 800, 800) wait(0.1) Part.Mesh.Scale = Vector3.new(700, 700, 700) wait(0.1) Part.Mesh.Scale = Vector3.new(600, 600, 600) wait(0.1) Part.Mesh.Scale = Vector3.new(500, 500, 500) wait(0.1) Part.Mesh.Scale = Vector3.new(400, 400, 400) wait(0.1) Part.Mesh.Scale = Vector3.new(300, 300, 300) wait(0.1) Part.Mesh.Scale = Vector3.new(200, 200, 200) wait(0.1) Part.Mesh.Scale = Vector3.new(100, 100, 100) wait(0.1) Part.Mesh.Scale = Vector3.new(0, 0, 0) end Part1.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:25 PM |
| please use a for loop before you make me cry anymore |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:26 PM |
| oh yeah, and make sure that the part has a mesh and change the number after Vector3.new to whatever you want it to change to. after you play around with it you will figure that out probably. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:27 PM |
| Don't make our special patients cry, or you'll become a special patient. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:27 PM |
| waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:27 PM |
local Part, Part1 = Workspace.Part, Workspace.Part1
Part1.Touched:connect(function() local i = 1400 while i > 0 do Part.Mesh.Scale = Vector3.new(i,i,i) i = i - 100 wait(0.1) end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jun 2012 09:27 PM |
| If you want a loop put while true do above the line with function.onTouched(hit) |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:28 PM |
@ this:local Part, Part1 = Workspace.Part, Workspace.Part1
Part1.Touched:connect(function() local i = 1400 while i > 0 do Part.Mesh.Scale = Vector3.new(i,i,i) i = i - 100 wait(0.1) end end)
This is for a better understanding of BASIC scripting |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 25 Jun 2012 09:28 PM |
Part = game.workspace.Part Part1 = game.workspace.Part1
function Shrink() for i = 1400, 0, -100 do Part.Mesh.Scale = Vector3.new(i, i, i) wait(.1) end end
Part1.Touched:connect(Shrink) |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:29 PM |
| Loops are fundamental. Those who do not understand them must GOBWEY. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:29 PM |
| Forgot the alternate version of the numeric for. GAH, such a waste. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:30 PM |
| did you not read above? this is a simple way for starters |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
| |
|
|
| 25 Jun 2012 09:32 PM |
@Distant
This forum is dedicated to those whom have a higher degree of knowledge regarding the Lua scripting language and the RBX.Lua platform. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:33 PM |
roblox used to market to creative kids
but then the fire nation attacked |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:34 PM |
| I used to never knew how to use vector3.new because me scripting mentor quit, i found out now, and it was so annoying when i didnt know what to do so i posted this |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:36 PM |
@Distant
You could always have used the wiki... >.> |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 25 Jun 2012 09:36 PM |
| If you didn't learn by yourself you must SUBWAY! (joke) |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:37 PM |
well, i used to go to this forum before i knew how to script.
umad bro? u jelly? |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jun 2012 09:39 PM |
>umad bro? u jelly?
uh no
not really |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:39 PM |
| and i know its a joke, but i bassically did learn on my own. after my teacher quit i only knew how to do simple ontouch scripts and cframe.new. i figured out alot of neew stuff |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:39 PM |
"umad bro? u jelly?"
On the contrary, I'm genuinely concerned with your mental health. |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 09:39 PM |
"On the contrary, I'm genuinely concerned with your mental health."
That's my turf.
You don't wanna walk on my turf. |
|
|
| Report Abuse |
|
|