Printing - Roblox Beginners Scripting Tutorial #2 (2024)
Summary
TLDRIn this Roblox beginner scripting tutorial, presenter Balev introduces the concept of scripting as a vital aspect of game development that adds functionality to game creations. He explains what scripts are, how they function in Lua for Roblox, and demonstrates creating and testing a basic script with print statements in the Roblox Studio environment. The tutorial aims to familiarize viewers with the syntax of Lua and encourages them to experiment with print statements, share their creations, and seek help from the community Discord server if needed.
Takeaways
- 😀 The video is a Roblox beginner scripting tutorial by Balev.
- 🔍 It covers the basics of navigating Roblox Studio and its features, which are essential for scripting.
- 🏗️ Scripting adds functionality to games in Roblox, differentiating it from other aspects like building and UI design.
- 📝 A script is a list of instructions that tell Roblox to execute commands when certain events occur in the game.
- 🤖 Understanding Lua, the programming language used in Roblox, is crucial for effective scripting.
- 📁 Scripts can be added to the Workspace or Server Script Service in Roblox Studio.
- 🔑 The script editor is accessed by clicking on a script object, and it provides a default 'print' command when first opened.
- 📡 Print statements are used to output messages to the Output window in Roblox Studio, which can be viewed during game testing.
- 🛠️ The Output window can be accessed through the 'View' tab in Roblox Studio during game testing.
- ✅ Testing scripts is done by hitting the 'Play' button in the test tab of Roblox Studio, which loads the game with the current scripts.
- ✍️ Case sensitivity is important in scripting, and syntax must be followed precisely for Roblox to interpret and execute commands.
- 📝 The tutorial encourages viewers to write their own print statements and share them in the video's comment section for a community challenge.
Q & A
What is the main focus of this Roblox beginner scripting tutorial guide?
-The main focus of this tutorial is to introduce the concept of scripting in Roblox, explaining what scripting is and how it adds functionality to games created on Roblox.
What are the other aspects of game development mentioned in the script besides scripting?
-The other aspects of game development mentioned are building, modeling, and UI designing.
What is an example given in the script to illustrate the need for scripting in game development?
-The example given is a spawn location in a game, which requires scripting to function properly, such as respawning a character after they die.
What is a script in the context of Roblox game development?
-A script in Roblox is a set of instructions or commands written in the Lua programming language that tells Roblox to execute these commands when certain events occur in the game.
Why is it important to write scripts in a specific way in Roblox?
-It is important to write scripts in a specific way to ensure that Roblox can read and interpret the commands correctly, which is crucial for the game's functionality.
What is a print statement in scripting and what does it do?
-A print statement is a command that writes a message to an output window, allowing developers to see the message when they run the game.
Where can the output window be found in Roblox Studio?
-The output window can be found in Roblox Studio by going to the 'View' tab and clicking on the 'Output' button.
How can you create a script in Roblox Studio?
-You can create a script in Roblox Studio by clicking the plus sign next to 'Workspace', searching for 'Script', and selecting the 'Script' option from the list.
What is the default command added by Roblox when you open a new script?
-The default command added by Roblox is 'print("Hello world")', which prints the message 'Hello world' to the output window.
How can you test the print statements in your script while playing the game in Roblox Studio?
-You can test the print statements by clicking the 'Test' tab and then clicking the 'Play' button, which will load your character into the game and display the print messages in the output window.
What is the importance of case sensitivity when writing scripts in Roblox?
-Case sensitivity is important because it affects how the Lua programming language interprets the commands. Being specific with uppercase and lowercase letters ensures that the script functions as intended.
What does the tutorial guide encourage viewers to do after completing the learning objective?
-The tutorial guide encourages viewers to continue the story with more print statements, share their creations in the comment section of the video, and join the Discord server for help if needed.
Outlines
📝 Introduction to Scripting in Roblox
This paragraph introduces the concept of scripting in Roblox, emphasizing its importance in adding functionality to games. The speaker, Balev, explains scripting as an integral part of game development alongside building, modeling, and UI designing. It highlights the role of scripts as instructions for Roblox to execute, giving an example of a spawn location that requires scripting to function properly. The paragraph also touches on the syntax and rules of Lua, the programming language used in Roblox, and guides viewers through creating their first script in the workspace, including navigating the script editor and understanding the default 'print' command.
🖋️ Writing Print Statements in Roblox Scripts
In this paragraph, Balev demonstrates how to write and execute print statements in Roblox scripts. Print statements are used to display messages in the output window during gameplay. The speaker instructs viewers on how to delete the default print statement and create custom ones by typing the 'print' command followed by the desired message in quotation marks. The importance of case sensitivity in scripting is also highlighted. Viewers are guided through testing their scripts in Roblox Studio, stopping the game, and continuing to add more print statements to create a sequence of messages. The paragraph concludes with an invitation for viewers to share their print statements in the comments section and an offer of help through a Discord server for those who get stuck during the tutorial.
Mindmap
Keywords
💡Roblox
💡Scripting
💡Lua
💡Spawn Location
💡Explorer Panel
💡Properties Panel
💡Print Statement
💡Output Window
💡Syntax
💡Case Sensitivity
💡Discord Server
Highlights
Introduction to the basics of navigating Roblox Studio and its features.
Explanation of scripting as a game development aspect to add functionality.
The importance of understanding the services offered by Roblox for scripting.
Introduction to the concept of a script as a list of instructions for Roblox.
The necessity of syntax understanding in the Lua programming language for Roblox.
Demonstration of creating the first script in the workspace.
Guidance on using the script editor and reverting to the game view.
Default 'print hello world' command explanation in a new script.
How to find and open the output window to view print statements.
Testing the 'print hello world' statement in the game.
Explanation of print statements for writing messages to the output window.
Case sensitivity in scripting and its importance.
Creating custom print statements and testing them in the game.
Instructions on how to stop play testing in Roblox Studio.
Encouragement to continue creating print statements for practice.
Invitation to share created print statements in the comment section.
Mention of a Discord server for additional help with scripting.
Closing remarks and anticipation for the next episode.
Transcripts
welcome back to my Roblox beginner
scripting tutorial guide my name is
balev and in this episode we'll be
discussing about printing so in the last
episode we covered the basics of
navigating around Roblox studio and what
Roblox Studio has to offer for us that's
going to be important for this entire
tutorial guide so for things like moving
around inside of Roblox studio also
showing you the services that Roblox has
to offer for us the Explorer panel and
also the properties panel that we're
going to be using throughout this entire
tutorial guide now that we have that
understanding uh for for the rest of
this tutorial guide I'm going to be
introducing to you Concepts relating to
scripting now to basically explain what
scripting is it's an aspect of game
development that allows you to add
functionality to your games that you're
creating on Roblox so the other aspects
of game development are things like
building like we just did right here um
maybe even things like modeling and also
um UI designing and all of these other
sorts of things scripting is a component
of game development that allows you to
add functionality to your game an
example I can think of this is this
spawn location right here so making the
spawn location itself requires building
but actually making it functional
requires scripting so if my character
were to join into the game then we need
to tell Roblox that we need to spawn on
this spawn location and if our character
dies then we need to respawn back onto
this spawn location so that is what adds
functionality to the spawn location
rather than it just being some random
part inside inside of the game so that
requires scripting to be able to um
essentially tell Roblox that we want
this uh spawn location to function the
way it is because of it and we add
functionality through scripts now to
explain what a script is it's basically
a document or a piece of paper that has
a list of instructions or commands that
basically tells Roblox to execute these
commands when we join into the game or
when a specific thing happens inside of
the game and so when we write these
scripts it's very important for us to
write it in a very specific way so that
Roblox can read these commands and they
can interpret it so they can understand
it finally execute them inside of our
game because this is one of the biggest
things new developers get confused with
and that is being able to uh get the
syntax down like understanding the rules
and guidelines when it comes to um
writing these commands because they fall
under a programming language called Lua
or Lua U uh for Roblox and so when we
understand this language then we're able
to write commands effectively and tell
Roblox to execute certain commands
within our scripts so let's actually
create our first script and we're going
to be adding this inside of the Explorer
and there's two places that are popular
for scripts the first one is the
workspace and the second one is the
server script service but for this
episode we're going to add a script
inside of workspace and there's there's
a couple ways you can add objects inside
of a folder one way is to hit this plus
sign that's next to workspace so I'm
going to click on this and there should
be a list full of all of these um
objects that we can put inside of this
folder so what I'm going to do is say
script inside of the search bar and
there's three scripts but for the sake
of this tutorial we're just going to be
using the normal script so I'm just
going to click on this and now we have
inserted a script inside of our
worksspace and you might have also
noticed that our screen has changed to
be inside of this script editor and we
can revert back to the game if we want
to by hitting down this tab right here
so we are now back into the normal game
and if we want to go back into the
script then we just simply click on the
script so that we can pull up the script
editor again and when we open up the
script for the first time Roblox is
going to add a default um command here
that simply just says print hello world
now it might be a little hard to read
for you so what I want you to do is hit
control and then move the mouse scroll
wheel inward so that you can zoom in um
but I'm already zoomed in pretty well so
if you need to do that then you can do
that very quickly so for this first
scripting episode what I'm going to show
you how to do is write these print
statements now what is a print statement
a print statement is basically a command
that allows us to write a message to an
output window so that we can see it uh
when we run the game now in order to
know where this output window is what we
need to do is go back into the game hit
on The View Tab and we're going to click
on this button that says output so if we
click on this then we can see this
window down here that shows our um our
print statements and also our logs as
well that's the whole point of the
output window it's so that we can see
whatever we put inside of here show up
down here when we join into the game so
if we go into the game we can actually
test this out for ourselves the way we
do that is by hitting on this test tab
up here and then we click on this button
that says play so if we click on this
then what's going to happen is first of
all I our character actually loads into
the game and we can play this game
normally as if this was a Roblox game um
but also down here we can see in the
output it says hello world which was our
message and we can actually click on um
the script that executed this command
and it's going to show us the script and
also the line of where our print message
executed so this print statement is
basically a print command that tells
Roblox that we want to print this
message down here inside of this output
so that we can see it for ourselves and
we can write our own print statements as
well um rather than having roblox's
default print message right over here so
what we can do is actually delete this
print statement so that we can write our
own print statement so what I'm going to
do is hold down the backspace so that it
basically deletes all the lines of code
that um was over here so we are on line
number one and now let's add in our
first print statement now one quick
thing I want want to mention is that
when we are writing our scripts it's
very case sensitive and what that means
is you have to be very specific with how
you write stuff inside of the script so
some things can be uppercase some things
can be lowercase and it's very important
that we understand when it is uppercase
and when it's lowercase so now let's
write our print statement we're simply
going to say in all lowercase we're
going to say print p in and then what
we're going to do is type the open
parentheses so we're going to press
shift 9 and then we're also going to put
in the double quotations so we're going
to say shift apostrophe and so now we
can write whatever message we want
inside of these quotations so we can say
as something as simple as hello just
like this with an explanation mark and
there we go this is our very first print
statement that we have going on right
over here we can test this by going into
the game and hitting play so as we can
see in the output it indeed printed our
message with hello now I forgot to
mention really quickly that uh when
we're playing the game inside of Roblox
Studio like we hit play uh in order for
us to stop play testing uh we go up here
and then just simply hit the stop button
I forgot to mention this because I do it
out of instinct so I apologize about
that um so what we're going to do is hit
stop and now we are back into Roblox
studio so now let's go back to our
script and we can actually add more
print statements on top of this print
statement so what we're going to do is
drop a line by hitting enter and as you
can see we are now on line number two so
we can write our print statement just
like uh we did the first time by saying
print open parentheses and we're going
to say double quotations and we can
continue what we were saying before by
saying how are you doing question mark
just like this so now we have two print
saens if we go into the game and hit
play then what we should see in the
output is two of our print saens instead
of just one so it's going to start with
hello and then it's going to say how are
you doing so if we hit stop and then we
go into the script we can continue this
chain of print statements if we want to
uh we can go and hit enter and then we
can write another print statement by
saying print open parentheses double
quotations and then I can say I'm doing
very well exclamation mark so now we
have three print statements and you can
continue going down the script editor
and just keep adding more and more print
statements if you want to do that um
because you can make this as long as you
want to like there's like you have the
power to make as many PR statements as
you want like if we go back back into
the game and hit play then as you can
see in the output it's going to display
the three print messages that we just
created now you don't have to worry
about the Syntax for right now that's
going to be explained in a future
episode but what I want you to do is I
literally want you to type exactly what
I'm typing here so that you get the feel
for knowing how to implement this stuff
inside of Roblox studio and so that
you're getting the experience alongside
me as we go through the scripting
episodes so that's basically going to be
it for this episode what I want you to
do for today's learning objective is to
continue this story of like you know
these three print statements you can
just continue down here by writing
another print statement or if you want
you can delete all of these print
statements and write your own story or
whatever it is you want to create so you
can just delete the entire thing and
then you can start back from square one
if you want to it's really up to you
with what you want to do now after you
do this what I encourage you to do is
take your print statements go down to
the comment section of this video and
then paste it so that other viewers can
see um your poem or your message or
whatever it is that you're comfortable
sharing uh to everybody El because I
just think it would be very fun to see
what everybody's doing for these
challenges so go ahead and do that uh
once you finish with this learning
objective and one more thing before we
end off this video if you get stuck at
any point throughout this tutorial guide
I have a Discord server which you can go
into to ask questions and get help for
your scripts if you want through the
link in the description so if you're
interested then feel free to join my
Discord server to get help while you go
through this tutorial guide so that's
pretty much going to be it for this
tutorial guide I hope you enjoyed it and
I will see you in the next episode take
care what
Weitere ähnliche Videos ansehen
Local Scripts (Server vs Client) - Roblox Advanced Scripting #1 (2023)
Learn LUA, The Basics | Episode 1
Roblox Studio Basics - Roblox Beginners Scripting Tutorial #1 (2024)
How to make a Roblox JOJO game #2 | Making Stand Combat
How To Make A Game Using AI In Roblox Studios
Intro Python- Printing in Python
5.0 / 5 (0 votes)