Advanced Roblox Scripting Tutorial #31 - BadgeService (Beginner to Pro 2020)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
alright guy that it's a deaf King here welcome back to a brand new real question from tutorial and guys in today's video I'm gonna be teaching you guys about bad service or basically what badges are what they do how they work he and yeah alright so what we're gonna go ahead and do first things first is go ahead and open up a blank baseplate and then when you actually publish our game okay because you can't have a badge unless it's actually a published game so make sure you go ahead and publish a game or if you already have one you know use that one I know I'm gonna go dead right now that is from scratch okay here we go I'm just naming this badge test and okay that should be good and then we need to go ahead and go on to our roblox website and then add badges from there so let me go ahead and bring this over for you guys here you go and as you can see I have all my games right here where's badge test I don't know wait let me refresh one second and it should be here gonna turn up then I'm not publisher right okay let me let me go through my gun my games and then I just find it there um but I guess you probably shouldn't do one just published I guess but let me find it configure this please can I do it from here no I don't think I can okay that's a shame alright well you know I'm gonna do it on this place doesn't matter that much I'm gonna do it on here alright so I have this game I made for another video called my first obby so I'll just use this one right here let me actually go and open that up one sec my games booth there it is probably because it's on private that's why my bad guys well you I'm not gonna waste your time but I'll see I'll use this place right here alright anyway so we're gonna go ahead and do now is actually go ahead and open up our games tab up here we're gonna need that for this we'd also have badges from here so I just couldn't on that alright let's actually go in and add a badge I want to see what happens here so let's go and right click and hit create badge okay and then it brings you here alright so now you have to upload your icon and okay we're good for good so let me go and upload an icon I'm sorry I don't want to leak my files okay let me just find something uh pictures so no not that one right just give me one sec got it promise okay you know I'm new this one again so this is this is like a screenshot from a video right here but I can use that one all right so it's a wait okay that's fine we're gonna name a badge a joining badge okay are you plate there we go we're name it you get this badge when you join this crappy game okay there you go and then I preview and then it'll pop up here I normally I do I create badges from like the create page but I guess he couldn't break like there and do bad it was too if you want and then it's creating it should create and there we go and you actually have to wow it cost a hundred road-book I'm getting it's a lot bad but you have to pay a fee if you don't want to pay it's fun you can watch the video and then you know one day whenever you do want to do it then you'll know but anyways now that we have that that's good and as you can see we have our badge right here okay that's it you played you get this bad you need to play the game play this crappy game okay alright so now we're gonna do is actually program some stuff to make our badge actually could be granted so what we're gonna do is we're gonna go ahead and go to our service trips rivers and we're gonna call this over here like badge Handler and then delete all that crap because we don't need any of that and then very good okay so we're gonna do first things first is go ahead and define bad service obviously we're gonna make sure we need to make sure we have our badge service so we'll do local bachelor's is equal to game get service bad service okay and then we're gonna go ahead and do is we're going to actually just assign it whenever they join the game so we're gonna do game dots players top player added connect function and all right so now we're gonna do is go ahead and actually get our badge ID though first I forgot that we need to get our bad ID so we're gonna do local badge ID is equal to and then we need to go ahead and go to our game page and then find that there it is click on it and then just copy that part up here right there and there we go and then we're gonna just paste that right there and then we're good okay perfect all right so now we're gonna do is uh I'll explain a few of the basic functions of badge service but I'm just gonna yeah I was like if y'all philosophy a few okay so first things first you have the award bad shirt or you have the award batch so we're gonna do that we're gonna do bad service dot award badge and then we're gonna get the user ID so we have the player in here for my bad and then we're so will then it'll do local player user ID play your user ID and then we're gonna make that equal to player dot user ID and then then we can pass that through right there and that's gonna be a long string you can also get this number from going to your roblox like paid right here if you go on your little roll up scale you'll see that this is use your ID right here so I could just copy that but that then that will only give it to me so we don't want that but yeah alright so then we're gonna go ahead and pass in a second parameter in this function of ward badge which is the badge ID obviously I got somewhat badge Allah reward which is this one the one we made all right so now whenever I click play I should get this batch now I'm not honestly under percent sure if it works in studio so we'll see if it other one studio then I'm gonna actually go into the actual game um I got it ok perfect so it says use code tap 1 use code taps you played Award yay I got a badge it's that simple guys it really is that simple and now badges you may be wondering like ok why do I want a badge they seem kind of useless and to be clearly honest they they kind of are but it's ok it could be used honestly as a means of saving data not not saying you should um but like you know it could be like used for that like you cuz you could always like see if the player has a badge but don't don't do that but what I would say it's most useful for honestly it's just like kind of marketing for your game because like if you go to a here let me show you if you go to a roadblock roblox game or a roblox players account right and you scroll down you'll actually see at the bottom here the plate at the back I've been playing a lot of Arsenal recently I'm sorry you'll see the like the badges the players recently gotten and this actually could form I guess this could be a form of marketing because people are gonna see these badges and like oh that's kind of cool they'll click on it and they'll see oh it's by this trove all community Oh or in this badge and Arsenal they click that and now they're playing Arsenal you know I'm saying so it actually is kind of useful and kind of important and definitely a must but it is something you can't add to your game because it makes it makes it kind of cool ok another thing you can do too is you can check if the player has the badge so if you want to see the player has a badge you can do you could do team service user or I'm sorry not our bad service bad service that user has badge async so we'll do local does tap water my name is tap water my def King does the dev King have the badge ok now that's a very long variable names do not ever use that variable name but you know we're just just for the time being okay and then we're gonna go ahead and put in here the badge or the player ID which is I'll just pop and paste that because we're not gonna really get that here coming pay stuff in there and then we're gonna need our game ID or our badge ID and actually I don't know why I'm typing in I should just put that there but there you go alright anyways and then let me pass that's through right here oh one and there we go there's our thing paste okay we're good alright and there we go now it'll it'll set it equal to true or false it returns a boolean value so we're gonna go ahead and do prints tells the player how's that gonna have a badge and then it'll say true or false and it should say true because we have the badge so yeah there you go that's that's true so perfect it worked that's awesome that's pretty much it guys that's literally bad service pretty simple there's other things you can do like like get badge info async so you can do you can do badge service get badge info and that I'll actually return a dictionary and it'll give you back four values which are the name of the badge the description of the badge the icon image if it's enabled like if it's available right now because you actually disabled badges by the way so yeah but that's like that really this is all you know like this is pretty much it there's really not much left to Paget besides that so yeah very very cool and if you want to actually print that out you can the information that we got okay we could do like you know like what people do is they do local info is equal to bad service and then a little put their badge ID in there and then you can actually go ahead and do prints info dot name okay or prints info dot description and you probably wonder like okay how do I know that like that's that's the thing because it's a dictionary and if you go on like though the wiki it'll tell you right like you could see here the Keef is name description icon has enabled all those things or you could just do like this and you could do for IV in pairs info and then you could do prints I and then you can print V no not like that let me put a space in between it okay I'm not sure how that's gonna look but we'll see I'm kind of curious honestly now and then it should print out all the info for the badge Oh nope that did not work sorry about that I forgot to concatenate it what did I do wrong here this is unable to kick I need a boolean value okay well you know what I'm gonna print V just instead because I it's I guess the last value you can't concatenate but it's fine it's fine you guys that's because okay there you go and there you go you could see here it says true it says are the what it's what is headed which return it prints difference everything out so yeah okay all right guys I think that's pretty much that's out of the video hope you enjoyed that if you like we should subscribe smash like button and be excited for more awesome robots to do scripting tutorials coming very soon guys next is an advanced tutorial actually no wait I'm front of think the order of the videos are coming out I don't even know but there's advanced tutorial coming out soon about threads so make sure to watch that it's pretty cool and interesting it's really it's a little complex a lot more complex than this for sure but yeah that's remote yet what we're gonna do I don't see the next one peace
Info
Channel: TheDevKing
Views: 12,282
Rating: undefined out of 5
Keywords: TheDevKing, Roblox Scripting Tutorial, roblox, studio, coding, tutorial, badgeservice roblox, badge service roblox, roblox badges, roblox badges 2020, how to add badges in roblox, how to add badges in roblox studio, how to add badges in your roblox game, how to add badges to your roblox game, how to add badges to your roblox game 2020, roblox tutorial - how to make and use player badges, how to script on roblox, how to code, roblox studio, roblox studio 2020
Id: Bxm-uiO7i88
Channel Id: undefined
Length: 11min 17sec (677 seconds)
Published: Sun Feb 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.