welcome back to my Roblox beginner scripting tutorial guide my name is balev and in this episode we'll be discussing about data types so in the last episode we were able to create a script for the first time and also add some stuff inside of our script inside of this script editor but now that we've gotten that taken care of I want to introduce to you a very fundamental Concept in scripting that is basically going to be part of our scripting Arsenal I guess if you want to call it um that we're going to be using
throughout the entirety of this tutorial guide and that is what's called data types so I want you to imagine this if we were to let's say change some properties inside of uh one of these parts that I created in the first episode so I'm going to select this part right here if we go on the right side we can see it's highlighted in the Explorer and it's also showing the properties for this part in the properties window when we're looking at these properties that are on the left side here these are the names of the
properties that we can modify and what's shown on the right side is the value of of these properties so when we're working with changing these values there can be different data types depending on what the property is so for example this brick color takes in a color value so if I select this and if I were to change um the color of this to something different we're essentially changing the brick color value or the brick color data type for this property and there's other uh data types here like cash shadow that has a check mark
that that shows whether this property is turned on or if this property is turned off if I click on it then it's going to be turned off and there's other ones like transparency which is a number data type so if I were to select this then we can uh use the slider to basically move this value from 0 to one as the max for this property and if we were to make it go backwards this way then it's going to make it go back to zero so as you saw with this uh transparency property it
slowly makes it more and more invisible um as we make it go further down the line but if we make it go back down here to zero then we can see this part fully opaque so now that we understand that these properties can have multitudes of different data types that we can use um when we're changing properties but not only that it also applies to our scripts that we're going to be writing inside of Roblox Studio to use different data types and if every single property was restricted to just one data type then we simply
just wouldn't have a game because if every single one of these properties were the same data type then um it would be it would it would give us a lot of restrictions to what we can change and what we cannot change which is why it's important to understand these different data types and when to use uh certain data types so now that we understand that let's go back to our script that we created in the last episode so what I'm going to do is go to the Explorer and then double click on our script so
now that we're here inside of the script what I'm going to do is drop two lines by hitting enter twice and now I'm going to introduce to you three basic data types that we're gonna have to know for the rest of this tutorial guide and the first one is called a Boolean value so now that we're here inside of the script what I'm going to do is drop two lines so I'm going to hit the enter key twice and I'm going to make another print statement so I'm going to write all lowercase print just like
this and then have the open parenthesis right over here now I'm not going to add in the double quotations just yet and I'm going to tell you why a little bit later so right now we just have the open parenthesis and what we're going to put inside of here is the first data type that I want you to understand and that is a Boolean now a Boolean is basically um a data type that gives one value or the other so with this data type there's only two possible values that can come out of this data
type which is either true or either false and one really big example I can give you for this is um a check mark when we're manipulating when we're changing a property of a specific part so if I were to select this and we have the property known as cast Shadow this is a check mark that can either only be one or two values it can either be turned on like it can be true but if we select it then it can be false or it's off so that's essentially what the Boolean data type is and
we can and we can show this by typing in all lowercase true and we can see that Roblox highlighted this in yellow to indicate that this is a Boolean value and we can do the same thing with the other value so if we drop a line and then write print open parenthesis and we write false then these are Boolean values so it can either be true or it can either be false and this is going to be very important later down the line when we're going to be uh using Boolean values inside of our scripts
so that's the first data type but the next one I'm going to introduce to you is a number so I'm going to drop two lines down here write another print statement have the open parenthesis and I don't think I need to explain what a number is I think it's pretty self-explanatory um but in terms of the size of the number we can use it kind of is Limitless um unless roblox's unless your Roblox game literally does crash because of how big these numbers can get you can basically put down a number that's super small or
you can put down a number that's super big so uh in this example what I'm going to do is put down a number of let's say 100 just like this then as you can see this number is yellow but it's not in bold um so that's how you know that this is a number now what I can do is drop another line make another print statement uh with the open parenthesis and we can have a negative value as well indicated by a dash symbol before we add a number to it so if we add 100
then this is negative 100 while this is positive 100 and both of these are whole numbers another thing we can do is have decimal numbers so if I were to drop a line down here make another print statement then what we can put down here is a decimal number uh indicated by a dot or a period so what I'm going to say is 100 Dot and then some other number after this like 50 it's going to be 10050 which is going to be our decimal number and so these are some of the ways we can
create numbers inside of our scripts that's going to be very important later down the line and finally I'm going to introduce to you the last data type so I'm going to write a print statement down here so I'm going to say in all lowercase print and then inside of here I'm going to show you what the last data type is and that's called a string now we've actually worked with strings in the past conveniently in the last episode it's indicated by this up here in double quotations now a string is basically a um it's a
list of characters or words or sentences or however you want to describe it all contained inside of one um data type which has two quotations so it's going to have one at the beginning and then one at the end so this basically shows us that this is um a string that comprises of a sentence full of characters and words and all these other sorts of things so we can create another string down here by having double quotations like this and then we can write down whatever it is we want inside of the strings so we
can say this is a string just like this now what's interesting about strings is that we can actually represent strings with either double quotations or we can even have single quotations as well and they will both be the string data type so if I were to drop a line down here make a print statement uh open close parenthesis we can actually put in single quotations just like this and we can write the same thing this is a string period so this is the string data type right here that we've actually used in the last episode
um we just didn't confirm that this is a string data type now that I was able to introduce to you what data types are inside of this episode so that's the basics of understanding data types and this is going to be very helpful for us later down the line as we continue to build up our skills in scripting so for today's learning objective what I want you to do is experiment more with these data types by either printing more true statements or printing um false statements or even printing more numbers you can experiment with these
numbers because there's a lot you can do with numbers there's only so many numbers you can print and I also want you to experiment more with strings if you haven't already um and even with single quotations as well so so once you do that go down to the comments and paste whatever you feel comfortable sharing so that other people can see what you've been doing um in these learning objective challenges so with that being said that's going to be it for this episode I hope you enjoyed it and I will see you in the next
one take care