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: Trying to learn basic scripting? use this to learn!

Previous Thread :: Next Thread 
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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
eyeontheprizeREBOOT is not online. eyeontheprizeREBOOT
Joined: 30 Jan 2011
Total Posts: 1555
25 Jun 2012 09:25 PM
please use a for loop before you make me cry anymore
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
25 Jun 2012 09:27 PM
Don't make our special patients cry, or you'll become a special patient.
Report Abuse
eyeontheprizeREBOOT is not online. eyeontheprizeREBOOT
Joined: 30 Jan 2011
Total Posts: 1555
25 Jun 2012 09:27 PM
waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
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
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
25 Jun 2012 09:27 PM
You sick freak.
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
25 Jun 2012 09:27 PM
If you want a loop put while true do above the line with function.onTouched(hit)
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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 is not online. 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
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
25 Jun 2012 09:29 PM
Loops are fundamental. Those who do not understand them must GOBWEY.
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
25 Jun 2012 09:29 PM
Forgot the alternate version of the numeric for. GAH, such a waste.
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
25 Jun 2012 09:30 PM
did you not read above? this is a simple way for starters
Report Abuse
lombardo2 is not online. lombardo2
Joined: 30 Nov 2008
Total Posts: 1604
25 Jun 2012 09:30 PM
SUBWAY D:?
Report Abuse
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
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
eyeontheprizeREBOOT is not online. eyeontheprizeREBOOT
Joined: 30 Jan 2011
Total Posts: 1555
25 Jun 2012 09:33 PM
roblox used to market to creative kids

but then the fire nation attacked
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
25 Jun 2012 09:36 PM
@Distant

You could always have used the wiki... >.>
Report Abuse
lombardo2 is not online. 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
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
25 Jun 2012 09:38 PM
I hate the Wiki
Report Abuse
eyeontheprizeREBOOT is not online. eyeontheprizeREBOOT
Joined: 30 Jan 2011
Total Posts: 1555
25 Jun 2012 09:39 PM
>umad bro? u jelly?

uh no

not really
Report Abuse
Distantsound is not online. Distantsound
Joined: 02 Dec 2011
Total Posts: 197
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
popinman322 is not online. popinman322
Joined: 04 Mar 2009
Total Posts: 5184
25 Jun 2012 09:39 PM
"umad bro? u jelly?"

On the contrary, I'm genuinely concerned with your mental health.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
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
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