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: Jojo's Scripting Guide: 1 - Learning Commands

Previous Thread :: Next Thread 
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
03 Oct 2011 02:55 PM
Hello! I'm going to be teaching you about scripting, it's really not that hard!

In this lesson i'm going to show you:

1. Creating a script
2. The Output
3. Commands
4. Waits

1. Before we can even start scripting, you must know how to create one. So, open "Roblox Studio", and push "Ctrl + N". This will open a brand new project, it's always good to start fresh ;D Now, to get all are tools ready. For scripting, we are going to need are "Output Bar", "Explorer" and "Properties" tabs open. Find and open them by clicking "View" on the Top Left.

2. Another great thing you need to know before scripting is the "Output". The Output lets you know whats running, and whats not, whats not working, and what is.
And if it's not working, then it shows you what line the error is on, and what you might need in order to fix it.

3. Ok, now we can start scripting!! Push "Insert" and select "Object", then find Script and open it. Double click the script, and it should open a white window with the words "print 'Hello world!'". Delete it, we will learn about printing later. WE are going to start out with a command script, command scripts are scripts that only include 1 line or so. They are the easiest type of script. Today, we are going to kill a robloxian, after 5 seconds.

First, since the Player is going to be in the "game", and inside "Workspace", we say "game.Workspace.Player". Now, we want to remove the Players Head, so in order to do that, we must go inside the Player, and find Head, like this. "game.Workspace.Player.Head" And to remove it... "game.Workspace.Player.Head:remove()".

Try testing your script in Script Builder.

It works!

Now, we need to make it wait "5" seconds, so, if we want something to wait, we say "wait()". And we put the number in between them like this, "wait(5)"

Put this BEFORE your previous script, so it should look like this:

"wait(5)

game.Workspace.Player.Head:remove()"

Good! Were done with this tutorial... So be sure to read the next one!

- Jojobenten





Have a question? Post it!
Report Abuse
mew9O3 is not online. mew9O3
Joined: 10 Jun 2011
Total Posts: 179
03 Oct 2011 02:56 PM
I always knew you didnt have much scripting talent

ಠωಠ
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
03 Oct 2011 02:58 PM
@Mew

..? If i didn't, why did my game get on the front page 72 times?? DD:

I hate to be mean, but yours hasn't.
Report Abuse
Celestrian is not online. Celestrian
Joined: 23 Aug 2010
Total Posts: 4412
03 Oct 2011 02:58 PM
Whew, that really worked, add more!

+ Add a glossary of technical terms describing what they mean at the end :P
Report Abuse
dap300 is not online. dap300
Joined: 23 Nov 2009
Total Posts: 4738
03 Oct 2011 03:07 PM
game.Workspace.Player.Head:remove()

n0b

coroutine.resume(coroutine.wrap(game.Workspace.Player["Head"]:Remove())))
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
03 Oct 2011 03:12 PM
You should really stop using camelCase.
Report Abuse
jojobenten is not online. jojobenten
Joined: 27 Jan 2009
Total Posts: 8819
03 Oct 2011 03:20 PM
@Rat

CamelCase?
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
03 Oct 2011 03:52 PM
Most of people refer to it as camelCase to show what it is. But yeah, Roblox seems like removing all camelCase things.
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