| Top posting users this month | |
| | | [ Beginner Tutorial...Under Construction... ] | |
|
| Did this help? ( First Tut!!! ) | | Yes | | 50% | [ 2 ] | | A Little | | 0% | [ 0 ] | | Ok | | 0% | [ 0 ] | | Not Really | | 25% | [ 1 ] | | No | | 25% | [ 1 ] |
| | Total Votes : 4 | | |
| | Author | Message |
|---|
raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: [ Beginner Tutorial...Under Construction... ] January 20th 2011, 4:19 pm | |
| Intro Hello, Scripting in Lua can be very helpful. For instance, Lua will help you make better places than those who cant script. All though, When your learning Lua it can be Very difficult. I'm still learning Lua aswell, Well Good luck in the scripting world of Lua! Functions Scripting is nothing without functions. Functions are everywhere in the world of Lua. Functions can be made or you can use already-made Functions such as function if then do ect. There are tons of functions! | Code: | functionaoz = Instance.new("Function") |
I think thats how you make a function. Exscuse me if im wrong.
Functions are very Important
Properties
Almost everything has a property! For instance Insert a brick from the Insert menu it doesnt matter what kind. So, lets change the brick's name.
| Code: | game.Workspace.Part.Name = "HdFp02" |
So to do it a more fun way you can do this
| Code: | game.Workspace.Part.Name = "Part" wait(4) game.Workspace.Part.Name = "KillerX210" |
Then we made a name change more difficult by 1 percent but its cooler
say we wanna name it Kill Is COol 101 we say
| Code: | game.Workspace.Part.Name = ["Kill Is COol 101"] |
Now changing reflectance brick color and transparency is the same
| Code: | game.Workspace.Part.Reflectance = 5.5 --That makes it reflectancy 5.5 it could also be Transparency just by changing reflectance to transparency |
Now Brick color is a little more complicated
Ill cover it later
Now instead of saying game.Workspace.Part All the time you could create a Variable wich i will cover next!
Variables
A variable is kind of important to shorten scripts.
For instance intead of saying game.Workpace.Part all the time you could create a variable
Variables are Stuff that stand for stuff like z could mean Part or Message or hint it can stand for almost everything
| Code: | Example: x = Instance.new("Message") Now x stands for an Instance that is a message or x = game.Workspace.Part | Now x stands for a Part
But x cannot have 2 values
so you could use a, b, c, d, e, f, g
But variables can go from as easy as L to as complicated as x2StarJammer/IncludedForYouToday Variables can be anything of your choice so
| Code: | CatInTheHat = Instance.new("Hint") |
Now CatInTheHat is a Variable Meaning it stands for a hint!
Positioning
Positioning is Important in Lua to
There are 2 types of positions CFrame and Position
for instance i want to move a brick on the edge of another brick or in the air
Ex: | Code: | game.Workspace.Part.Position = Vector3.new(10,10,10) |
So we changed its position to X = 10 y = 10 and Z = 10
Vector3 is a Movement function so Vector 3 is the numerals meaning it needs 3 numerals. 10 10 10 is the Numerals.
Ex: | Code: | game.Workspace.Part.CFrame.Value = Vector3.new(101,20,40) | Thats a CFrame Value their very Useful.
So i just made that brick collide with any brick near it or i changed its CFrame value.
Arguments
Arguments are very very important without an argument the script wouldn't work.
Ex : | Code: | game.Workspace.Part.Position = Vector3.new(12,20,14) |
Can you guess what the argument was there?
The argument passed there is 12 20 14 most arguments come before functions with a () or :
Ex: | Code: | game.Workspace.Part.Position = Vector3.new(Cheezburger,2,10) |
That wouldnt work because cheezburger isnt an argument but if you do this
| Code: | Cheezburger = 5
game.Workspace.Part.Position = Vector3.new(Cheezburger,2,10) |
That would set the position to 5 2 10 Interesting right?
now watch this...
| Code: | game.Workspace.Part.Position = Vector3.new(a, b , c ) |
Same as cheezburger wont work but...
| Code: | a = 10
b = 10
c = 10
game.Workspace.Part.Position = Vector3.new(a, b, c) |
That would work!
Isnt Positioning Fun?
Tables
Tables are used to store stuff in... For example, ever seen a VIP door/ Admin script?
It says | Code: | adminlist = {"raboy117"} |
Thats a table...
just say
| Code: | coolppl = ("websiteRobloxYouNeedUs") |
And to add on to that we do | Code: | coolppl = ("websiteRobloxYouNeedUs","Roblox") |
There we go! and tables... Witch ill cover next.
MetaTables
Tables can have tables too!!!
--[[This is UNDER CPNSTRUCTION, Do not flame me, If you have any Ideas, Please message me on roblox or here, If you wish to help me out please give me suggestions for this. Thanks! ]]-- _________________ Site Hunter, Moderator.
Last edited by raboy117 on January 22nd 2011, 1:00 pm; edited 2 times in total (Reason for editing : Updating, adding code, etc.) |
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 20th 2011, 4:56 pm | |
| I Hoped this helped :) _________________ Site Hunter, Moderator.
|
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 21st 2011, 4:50 pm | |
| :/ Barely anyone read this D: _________________ Site Hunter, Moderator.
|
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 21st 2011, 5:03 pm | |
| | Supernapalm wrote: | im considering you a spammer for doing this:
_________________ Site Hunter
_0900 R0 5)4500 0 45 45 0 0 0
Double M ( Math Master ) That's How I'm known in my class :D |
how is that Spam????
No sense. Thats my signature ._. _________________ Site Hunter, Moderator.
|
|  | | naknak Administrator


Posts: 855 Join date: 2010-07-30
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 21st 2011, 5:10 pm | |
| Why do you both have the same signature? |
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 21st 2011, 5:11 pm | |
| We don't... he just said that thats spam when its my signature SO NO SPAM! _________________ Site Hunter, Moderator.
|
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 22nd 2011, 1:02 pm | |
| Updated it... Added Tables and more, fixed code and more... _________________ Site Hunter, Moderator.
|
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 22nd 2011, 2:19 pm | |
| Better tutorial now. _________________ Site Hunter, Moderator.
|
|  | | NotAPotato Expert Scripter


Posts: 40 Join date: 2011-01-21
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 22nd 2011, 4:31 pm | |
| Too much false information, and not a good tutorial overall. |
|  | | slayer9365 Administrator


Posts: 233 Join date: 2010-07-31 Age: 17
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 22nd 2011, 4:45 pm | |
| | Quote: | There are tons of functions!
Code: functionaoz = Instance.new("Function")
I think thats how you make a function. Exscuse me if im wrong.
|
there is no object "Function" so you are wrong. |
|  | | raboy117 Moderator


Posts: 75 Join date: 2011-01-19 Age: 14 Location: Canada, PEI, Charlottetown
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] January 22nd 2011, 8:27 pm | |
| ... Read that quote " Excuse me if im wrong."......... Oh and 1 first tutorial, 2 I started working on this when i was a Newb, 3 I wrote this when i was tired. _________________ Site Hunter, Moderator.
|
|  | | blueymaddog Administrator


Posts: 1108 Join date: 2010-12-09 Age: 13
 | Subject: Re: [ Beginner Tutorial...Under Construction... ] March 11th 2011, 3:23 am | |
| nah, your still a newb. lol jk. (B _________________ blueymaddog Administrator • Moderator • Expert Scripter PM: blueymaddog<+1 post. ujelly?> |
|  | | | | [ Beginner Tutorial...Under Construction... ] | |
|
Similar topics |  |
|
| | Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| | Who is online? | In total there are 2 users online :: 0 Registered, 0 Hidden and 2 Guests
None
Most users ever online was 19 on April 5th 2012, 4:06 am
|
| Please tell us what time zone you are in here
Got a really good idea? Post it in projects and it might show up here! |
|