Advanced Roblox Scripting Tutorial #1 - Tools (Beginner to Pro 2019)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all righty guys it is the Deaf king here back with another video and in today's video guys I'm gonna be showing you how to make tools so look at this look at that okay so this is my first tool well not really because I'm a told before but anyways this is what a tool is and basically it's like a little weapon you can equip and you can make it do stuff so yeah so I press one and you know I equip it that's what a tool is now you've probably seen them before in roblox games and they're pretty important I use them quite a bit and you probably will too so we need to know them you need to know how to use them so anyways guys let's get right in this tutorial and I'm gonna show you how to make tools and all about them okay guys so first things first before we get into the video I just want to say if this is your first video by me please go to the link in the description and watch the ones all before this there's a playlist there you might get confused and you probably will get confused if you don't know the basics so I'm yeah make sure to watch that and also guys welcome to your first episode of the advanced series okay you guys have graduated the double you know you graduated the advanced or the beginners series that's really awesome seriously guys it's like it's like it's something to be proud of case so package stuff on the back guys seriously you guys did a great job going all the way through that and hopefully you did but um yeah and if you do this video like I said or if he new to this video like I said please watch the beginner series first or else you're gonna be really confused cuz this is the advanced stuff so yeah anyway so let's go ahead and get into this tutorial and show you all about tools okay alright so I'm gonna go ahead and elite this but um also guys this video might be a little bit long because tools are pretty they're not hard but it's a lot goes into them so yeah okay guys so first things first I'm gonna go ahead and make my tool so in roblox you have these instances or instances called tools so if you go over here in the workspace you can go ahead and put right click it and then hit insert object and then you can find tool right and now basically I already showed you what it is but it basically you can equip and stuff like that but if it's in the workspace it actually won't go to your character so you're gonna need to move it to your starter pack now basically right here starter pack what starter pack does is anything that's inside of this folder starter pack is gonna go right into your character and you'll have it in your inventory and you'll be able to use it that's basically what it is so yeah alright so we're gonna go ahead and a Mar - we're gonna call it block sword okay so we're gonna make a block sword right so we're gonna go ahead and name it that and then we're going to go ahead and add a part into it okay so if you actually just have a tool the you know roblox just knows that's what you need to equip but it doesn't know what the tool supposed to look like right so you need to make a part now if it's in your starter pack you actually can't see the tool it's like in like the starter pack so you need to move it back into your workspace to see it so yeah now we can mess with the parts and stuff okay so um right now I only want to make one like one part out of the tool okay so don't enter any more parts into here also won't work that's a little bit more advanced we'll get into that later but for right now just use one part and we're going to make a little sword type thing now this is gonna look really bad okay um I'm gonna try to see if I can change the shape it's like a cylinder maybe okay that that doesn't look good but you know what this is gonna be our sword okay now listen this is a sword okay so I'm gonna make it like I'm not black okay we're gonna get the there you got that color okay paste all yellow okay this is our sword right now okay and now if we go ahead and move this back quarter pack we can start the game and actually actually before we do that don't start the game I forgot to mention one thing you need to make sure that your um your part inside of the work space right we're not sentient workplace your part inside of the tool is named handle because basically roblox needs to know what you like what part of the tool needs to be a handle and right now we only have one part so obviously it's the only part we have so make sure you guys reading them that handle and make sure has a capital H - roses will not work so yeah so basically it's kind of weird but it needs to be followed exactly like that handle just like that and then it'll work you know good so yeah make sure it's name panel with the part and yeah it should be good you can keep the tool name whatever you want but the handle or the part needs to be named panel or one of the parts need to be so anyways now that when you started that or now that we put that set that out put that in the starter pack so that way it'll go into our character so now let's go ahead and hit play show you some stuff about tools okay so let's go ahead and play and okay and boom we got our first tool and I'm holding it sideways okay you don't need to make your tool look like mine if you want to you can but yeah I okay anyway so this is what it looks like great I'm holding it out and I obviously I can rotate it I can do something like that to it but um yeah but yeah okay so one more thing about told you guys need to know when you have a tool right right now it was in the starter pack so that it went from the starter pack right two players to my player cuz you know that's the only person playing the game and then it went to my backpack okay cuz it's a starter pack and then it goes right in the backpack basically it's what starter pack does right so then right now it's in my backpack now if I were to equip the sword it disappears now you're probably wondering why doesn't why isn't on your backpack anymore basically when you have a tool equipped in roblox it actually gets ready it goes out of your backpack and it goes into your character now okay now let me clean one more quick thing so there's okay in roblox studio there's players and there's characters now players and characters are pretty much the same thing but the difference between the two is that a player is like this thing right here right it's like the little stuff it's a player you see the little icon there right and players that's what a player is okay it's named tapwater RB elect which is my username right but there's also a character in the characters in the workspace because you know everyone in the game needs to be able to see your character and I don't you know you want to see it too because if you move your character into the oh crap if you move your character into the I just okay if you recover into the players it wouldn't work and I don't think so yeah so that's what your character is it's the thing in the workspace and basically all like the parts of you like you see you have your foot you have your all that stuff that's what the character is so yeah I hope you guys get that cuz that's pretty important anyways that's what okay so yeah basically it goes from your backpack into your player as you can see here it's now a bunch the child of my player or I'm sorry it goes with my backpack into my character I'm so sorry and so now it's a child of my back or of my character okay geez hope here's going I'm saying you see it teleports back and forth okay as you can see there so yeah when having a clip when I don't have it recovered it's in my backpack anyways that's pretty important okay now second thing second I need to go ahead and show you guys yeah okay okay now I need to show you guys like how its make the tool do something you're probably wondering okay we made the tool now I want to make it actually like kill someone and maybe maybe not that but you know maybe want to make a kill like a make a block okay so we're gonna make a part here just to test it out and we're going to name this part we're going to call this parts destroy me okay and wait crap destroy me destroy me okay now what we want to do is we want our sword whenever it's equipped we want it to break this part whenever it touches it so yeah okay so what we're gonna do is insert a script into our tool so make a script and put it into your tool and then we're gonna go and cut all this out and also I'm gonna go ahead and show you guys a few the events of the for the tool which you need to know so I'm gonna go and open the object browser over here and scroll down to tool okay and here we go all right so um all these are pretty much the basic events that every object house these these six are here whatever but the ones I want to look at are activated deactivated and unequipped and equipped okay so they're pretty simple okay I'm gonna show you what they all do so we're gonna go ahead and well are we're gonna go ahead and assign the tool to a variable so we can have pretty easily so local tool equals script dot parent okay now we're gonna do tool not activated connects function now you should know what I'm doing right now because this is we learned this in the last or look we learn this in the beginners series so you should know how to do this and then we're gonna go ahead and make it prints you clicked me you click to me or okay okay basically what tool activated does right Toula activated it basically means whenever you click with the tool and like it's activated so whenever you click the tool and you have it equipped basically what it'll do is it'll run this event right here so it's gonna fire off activated and then test it out real quick to make sure it works and yeah hello click and boom see I can click anywhere but um and then it activates now what we want to do that as we want it whenever it activates we wanted to break this part is what we want to do so um yeah anyway so let me show you some more events for it first and then we'll do that in a second so we're gonna do tool dot deactivated now basically tool doc do you activated means if you like it runs right after you do back to it put the tool so like I'm pretty sure if you like hold it right so if you're oh wait crap and okay I put a thing in there but yeah if you hold like the the tool down when you haven't equipped basically it's gonna stay activated but then when you let go it's gonna deactivate so we're gonna go ahead and print I got deactivated okay and the tool sat now okay he's sad because you got deactivated okay anyways alright so let's see if this works oh wait I put our parenthesis in there that's that's gonna give me an error I think I don't know okay you know what I'm just gonna put it there we go he's happy now okay anyways okay um here we go let's click and then see it's activated right now I'm holding down my mouse button I'm holding it down and then let go I got deactivated and he's happy about that alright so cool it doesn't work okay so that's basically what those do those are pretty useful events and that's basically how you detect if it clicked and then we're gonna go ahead and show you tool dot equipped which is pretty simple guys it's basically if you cook the tool it runs so so I don't do that real quick so um let's go on prints yeah you are using me okay so basically now whenever I equip the tool it's going to be happy because I'm using him see and then if I click it's gonna activate and then if I let go it's gonna deactivate so there you go and unequipped basically is it's pretty simple it's basically when you you know on equipment it's what you know that's what the event does so it's gonna be the syntax fattest tool dot unequipped so I'm not gonna show you guys that one cuz it's pretty simple you know what that means but um yeah anyway so now let's go ahead and make it so it actually runs weird I and we actually want to do what the script says okay we're I'm sorry sorry we want to make it so whenever we activate the tool it breaks that part right here okay so destroying apart all right so we're gonna do now is write some code so we're going to do this okay we're gonna do tool to activate it so whenever it's activated we want it to destroy this thing so we're gonna go ahead and get the variable of that or sonet variable to that destroy anything right there so there's so the kind of the load the code doesn't get too long in one line so also let me zoom in hopefully that's kind of good so get our workspace not destroying me okay there we go and then we're gonna do destroy me destroy okay okay so basically basically what this destroy function does is it's a built-in function in roblox that just destroys the part and in the game aren't in the entire like memory okay so basically it's gonna delete so I'm yes now we're gonna just whenever we activate it's gonna destroy that part and let's make sure it works and oh there we go come on come on and there you go we don't have to look at or anything we can just destroy from anywhere but and boom it destroyed okay that's pretty awesome I like that okay so yeah that's what the activated thing does and that's some practical use for it and that's pretty much it guys I hope you did enjoy the video leave a like if you did enjoyed the video guys seriously and mate helps a lot so leave a like and subscribe if you're new what you shouldn't be new okay should be already subscribed okay what are you doing man but anyways that's time as it sort of guys we may have some more stuff explaining tool later on I'm not too sure but um but yeah anyways guys congratulations for completing your first tutorial of the BAM series I hope you understood this was a pretty fun thing to start off with so I wanted to do that but yeah in the advanced series we're gonna learn some like something about Mouse's or starting up Mouse's like using your mouse to click stuff like some other like oh like a remote function stuff like that and then we'll have a GUI series coming soon after the advanced series and once you know pretty much all the syntax and you know understand Lua pretty well so yeah enemies guys that's it and I'll see you in the next one peace out everyone
Info
Channel: TheDevKing
Views: 218,852
Rating: undefined out of 5
Keywords: TheDevKing, Roblox Scripting Tutorial, roblox, studio, coding, tutorial, how to script on roblox, roblox studio, roblox scripting, Advanced roblox scripting tutorial, thedevking scripting, thedevking roblox, thedevking roblox studio, thedevking coding, tools in roblox studio, how to make tools in roblox studio, tools roblox studio, roblox studio tools, how to make tools in roblox studio scripting, how to script tools in roblox, how to make a sword in roblox studio
Id: UoVYIZYKPOI
Channel Id: undefined
Length: 13min 6sec (786 seconds)
Published: Sat Aug 03 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.