Absolute beginner's guide to scripting: Difference between revisions

→‎Testing the script: Corrected some mistakes and put emphasis on the fact that you can now only get command bar in the studio.
>JulienDethurens
(→‎Writing Lua code: Changed the Remove method to the Destroy method.)
>JulienDethurens
(→‎Testing the script: Corrected some mistakes and put emphasis on the fact that you can now only get command bar in the studio.)
Line 61: Line 61:
===Testing the script===
===Testing the script===


To test your fine script, enter any normal ROBLOX place in Solo mode so that you can walk around with your character. Open up [[Roblox Studio]] and open the [[Scripting#Fundamentals|Command Bar]]. Type your one-lined wonder in, and hit enter to run it.
To test your fine script, enter any normal ROBLOX place in solo mode (or build mode) so that you can walk around with your character. Open up [[Roblox Studio]] and open the [[Scripting#Fundamentals|Command Bar]]. Type your one-lined wonder in, and hit enter to run it.
 
'''NOTE: You must open build mode or solo mode from the studio, if you open it from the browser, you will not be able to open the command bar.'''


If your head just disappeared and you heard an "Oughh!" sound because your character just died, then you have succeeded. Your script works.
If your head just disappeared and you heard an "Oughh!" sound because your character just died, then you have succeeded. Your script works.


If your script does not work and nothing happens, expect this to happen a lot. Scripters (and programmers alike) run into the problem of their scripts not doing something right because their code has bugs in it. Not to worry, though - there is [[Output]], a key tool that can help you debug your scripts and get them working.
If your script does not work and nothing happens, expect this to happen a lot. Scripters (and programmers alike) run into the problem of their scripts not doing something right because their code has bugs in it. Not to worry, though - there is the [[output]], a key tool that can help you debug your scripts and get them working.


==Setting Values in ROBLOX Lua==
==Setting Values in ROBLOX Lua==
Anonymous user