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: Lua scripting for noobs (new people)

Previous Thread :: Next Thread 
linker123456789 is not online. linker123456789
Joined: 05 Sep 2008
Total Posts: 120
06 Oct 2011 12:27 PM
The ultimate trick to being a scripter is to mastering how to make code that does what you want, when you want it. Since you are a beginner, you will be walked through the steps to making your code do what you want starting from English to Lua code. Do not think of scripting as translating to a language; think of scripting as giving orders on what to do.

Here's our starting command. It's what we want to happen, and it has been written in plain English.

Remove linker123456789's head.

Naturally, ROBLOX will not like that very much because it's in English! You have to figure out how to express what you want to happen in Lua code.

In game, find Workspace, find linker123456789, find his Head, and remove it.

game is the root of all things in your game. We need to "go down" the family tree and find the right brick to remove. To get an object that is a child of another object this, you use a period (.) after the parent object, then the child object's name. Going through the family tree, we get this:

Delete game.Workspace.linker123456789.Head

This is almost a working ROBLOX Lua statement! Now, to actually remove the head, a method must be used. Methods are functions that do specific things in ROBLOX for you by calling them. Methods are functions of objects in ROBLOX Lua. To call a method on an object in Lua, you use a colon (:) after the object. You then state the name of the method, then two parenthesis with nothing in them. Methods and functions take arguments, which are values given to the function to change how it works. The "remove" method takes no arguments, so we place the parenthesis there to show that there's nothing else we have to give to the remove method.

game.Workspace.linker123456789.Head:remove()

The above statement is syntactically correct Lua code. However, your name probably isn't linker123456789, so substitute your name in. If your name was "AwesomeSocks", then you would use the following:

game.Workspace.AwesomeSocks.Head:remove()

To compare this to English, it would be like saying "The sky has trees". It is grammatically correct English, but an untrue statement. If you state the name of things that do not exist, your script won't work and an error will occur.

My advice to you if this does not help is go directly to a LUA wiki that might be more suited for you.

Questions? PM me! im willing to help anyone who needs it, and if i dont know that exact answer to your question ill find someone who can help you :)

***NOTE:: the best way to see if your getting the hang of it is to read it once, then read it again but this time have ROBLOX studio open on your place, with command bar open so you can copy and paste***

NOTE:: to insert text to the command bar in game is CTRL+V at the same time :)
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
06 Oct 2011 12:28 PM
I never heard of LUA.
Report Abuse
BloxBuilder900 is not online. BloxBuilder900
Joined: 31 Mar 2009
Total Posts: 2231
06 Oct 2011 12:55 PM
LearnUrAcronyms
Report Abuse
linker123456789 is not online. linker123456789
Joined: 05 Sep 2008
Total Posts: 120
06 Oct 2011 01:03 PM
LUA is the script you use to create ROBLOX games my friend.
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
06 Oct 2011 01:04 PM
Heck nope.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
06 Oct 2011 01:06 PM
[ Content Deleted ]
Report Abuse
linker123456789 is not online. linker123456789
Joined: 05 Sep 2008
Total Posts: 120
06 Oct 2011 01:08 PM
Yes i know....Its to help those people who dont like to branch out and find a wiki, or a tutorial.
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
06 Oct 2011 01:09 PM
[ Content Deleted ]
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
06 Oct 2011 01:13 PM
@linker 2 of the threads I seen by you are totally useless, you say you know how to script in Roblox while you don't even know the name of the scripting language. You make a C++ tutorial copied from somewhere else. Instead of trying to look great do us a favor and learn how to script, else learn something that fits you.
Report Abuse
linker123456789 is not online. linker123456789
Joined: 05 Sep 2008
Total Posts: 120
06 Oct 2011 01:27 PM
Right, and this makes you cool? for pointing out something that's not true?
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 Oct 2011 01:30 PM
First of all OP.

Roblox runs at Rbx.Lua
Dont say it uses LUA. And what is LUA Anyways? Do you talk about Lua?
Rbx.Lua is Lua you are right with that. But it is changed for Secutity , Simpleness and more

Juriaan
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
06 Oct 2011 01:34 PM
I don't care what people think about me, it's a virtual game. I just hate people like you.
Report Abuse
kingmod123 is not online. kingmod123
Joined: 16 May 2009
Total Posts: 699
06 Oct 2011 01:34 PM
What's OP?
Report Abuse
juriaan is not online. juriaan
Joined: 25 Nov 2008
Total Posts: 939
06 Oct 2011 01:53 PM
Orginal Poster
Report Abuse
micol2242 is not online. micol2242
Joined: 13 Nov 2010
Total Posts: 4732
06 Oct 2011 02:16 PM
Plagiarizer.

--what is this i dont even--
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
06 Oct 2011 02:26 PM
i still don't know what this "LUA" (is anyone actually going to correct this?
Report Abuse
myrco1001 is not online. myrco1001
Joined: 17 Sep 2010
Total Posts: 2574
06 Oct 2011 02:42 PM
@juriaan: Lua is niet RBX.Lua, het is een beetje anders.

-♂ MYRCO♂-
Scripter, music obsessed, atheist and dutch. What else?
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