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