Beginner's Roblox Scripting Tutorial #7 - Parameters (Beginner to Pro 2019)

  Рет қаралды 290,695

TheDevKing

TheDevKing

Күн бұрын

Beginner's Roblox Scripting Tutorial #7 - Parameters (Beginner to Pro 2019)
Hey guys, in today's video I am teaching you about parameters and I promise you this is the last tutorial on functions for a while because I know the past 3 were on functions and it was probably quite boring! But anyways this is very important so enjoy and learn peace!
Link to Beginner's Tutorial Series:
• Beginner's Roblox Scri...
-- Follow me on twitter! (my name is tapwater because thats my main channel): / realtapwater
- Join my Discord Server to learn and meet other developers!-
/ discord
--What is this series about and who is it for?
So this series is meant for people who really want to learn exactly how to script, if that is you then I promise by the time you watch this whole series you will know exactly how to script on roblox. Anyways be sure to subscribe to see whenever I release a new tutorial and I will see you guys in the next one. Peace!

Пікірлер: 1 300
@TheDevKing
@TheDevKing 5 жыл бұрын
Hey guys! Be sure to join the discord server if you have any questions or if you would like to meet me! discord.gg/FKcSyRh
@pickleiii1848
@pickleiii1848 4 жыл бұрын
Why there no replys?
@pickleiii1848
@pickleiii1848 4 жыл бұрын
@Builderman cool
@voidago7341
@voidago7341 3 жыл бұрын
The invite do be expired
@stak321
@stak321 3 жыл бұрын
Yeah
@nazilapasha8876
@nazilapasha8876 3 жыл бұрын
Im so confused tbh WHY in the world is this whole output thing even neccesary
@TofuTuesdays
@TofuTuesdays Жыл бұрын
If anyone wants an example of how this can be used, review this code: local part = game.Workspace.Baseplate local function transformfunc (mat, trans) part.Material = mat part.Transparency = trans end transformfunc("Sand", 0.5 ) wait(10) transformfunc("LeafyGrass", 0) Its quite simple, the moment you start the game the baseplate will become sandy and half transparent, then after waiting 10 seconds the code will run the function again, except with different parameters. It can be a huge help when you want an item or value to go through different states after a certain requirement has been met. Parameters are used here simply to save time and simplify code.
@unsolved1376
@unsolved1376 Жыл бұрын
good example thx
@clippedbyta
@clippedbyta Жыл бұрын
great example
@NotSoGreatPerson841
@NotSoGreatPerson841 Жыл бұрын
OOOH i get it now. Thanks!
@hunaidkiani6100
@hunaidkiani6100 Жыл бұрын
Thank you so bro, you helped me understand parameters on a whole another level. Thanks!
@Azure546
@Azure546 Жыл бұрын
This was short easy and simple great explanation yk, not only that, after finishing 10 tutorials, I’d recommend testing yourself by using all of them without any help, and note the ones that you struggle with and rewatch those vids. Getting practice in can help you remember those.
@enlasted5320
@enlasted5320 5 жыл бұрын
Holy. Thank you sir, you're the only individual who has explained parameters in a way so that I could understand them.
@oldscratch6861
@oldscratch6861 5 жыл бұрын
Was just gonna comment this.
@tentix9022
@tentix9022 4 жыл бұрын
Watch peasfactory
@MarioMario-yb3iz
@MarioMario-yb3iz 4 жыл бұрын
@@tentix9022 thx man 😄
@tentix9022
@tentix9022 4 жыл бұрын
@@MarioMario-yb3iz lol no probs
@bepski
@bepski 4 жыл бұрын
Neoory doesn’t matter how long it is as long as it helps
@kenaboss4527
@kenaboss4527 4 жыл бұрын
what is with this man and hotdogs
@petars5914
@petars5914 4 жыл бұрын
hotdogs r cool
@akshitagoel6762
@akshitagoel6762 4 жыл бұрын
Let's just say that he is always hungry and he loves eating hotdogs...
@sylvanusdzotsi2234
@sylvanusdzotsi2234 4 жыл бұрын
ik i was gonna comment that lol
@itseasy4us256
@itseasy4us256 4 жыл бұрын
He is spending 1000$/month on hotdogs.
@kryptcx
@kryptcx 4 жыл бұрын
Plot twist his side job is a hotdog stand
@emmettnredblue1857
@emmettnredblue1857 5 жыл бұрын
I am so confused But I’m never giving up! I will watch this series over and over if I have tooo!
@ayanokouji5784
@ayanokouji5784 4 жыл бұрын
same, i think this is my 3rd time rewatching the beginners series
@NewsOnQueue
@NewsOnQueue 4 жыл бұрын
What are you confused about? These are pretty simple for the most part. I cam answer your question about this. If you still have questions.
@gabe1351
@gabe1351 4 жыл бұрын
@@NewsOnQueue I don't understand how to do functions
@NewsOnQueue
@NewsOnQueue 4 жыл бұрын
@@gabe1351 honestly just keep researching and practice writing the ones in tutorials and one day itll just click. What is it that you dont get about them?
@ddso4365
@ddso4365 4 жыл бұрын
@@gabe1351 you type "local ("here the name of your function") and then () the () are there for the parameters as you saw in the video after that you gonna type in your lines of codes and execute them with ("the name of your function") and then ()
@GDcelta
@GDcelta 4 жыл бұрын
others tutorials: 20 minutes TheDevKing tutorials: 5 minutes thx god!
@failuretocomply3
@failuretocomply3 4 жыл бұрын
lol
@chrismelon8192
@chrismelon8192 3 жыл бұрын
Not even 5 min there like 3 minutes
@Assassinbunny
@Assassinbunny 3 жыл бұрын
Other channels usually explain everything and try to miss nothing.
@Assassinbunny
@Assassinbunny 3 жыл бұрын
@EpicGreenYoda true
@pranjalpadmakar5489
@pranjalpadmakar5489 3 жыл бұрын
alvin blox tought parameters while in his function video and i got so confused. but this is much better! plus alvin makes 20 min vids to explain and this is like 5
@Lycoriste
@Lycoriste 3 жыл бұрын
For those who don’t understand or still confused, parameters are like variables. Just think of them as variables, as in function(x, y). If you call function(1, 2), then x = 1 and y = 2. Since quite a decent amount of people see this, I’ll just add some more information, don’t read further if you’re easily confused. The variables that are passed into the parameters are actually copies. I’ll show you what I mean (and I haven’t touched Lua in a long time so I’ll be doing this with “pseudocode” mixed with C++): Let’s say we have a function called add that takes two integer variables… func int add(int x, int y) { return x + y; } And we have two variables called num1 and num2 outside, declared like so: int num1 = 0; int num2 = 1; Then passing that into the function - add(num1, num2) - should return 1 alright. Now let’s say we want to edit the parameters, adding 2x of each number (ex: x*2 + y*2). func int add(int x, int y) { x = x*2; y = y*2; return x + y; } So what do you think will happen if we run add(num1, num2) now? It should return 2 because 0*2 + 1*2 = 2. But here’s a question that comes up a lot with amateurs: are num1 and num2 multiplied too? No, the variables num1 and num2 are not changed AT ALL. This is because they’re passed in as parameters so int x and int y are simply variables that exist inside the function and the function only. Knowing some of you curious dedicated hardworking learners, you may ask, “Then how would I reference variables outside with my parameters?” Don’t worry, there’s a way. I’ll update this later because I’m on a phone. Alright here's the next part :) So in a language called C++, you can do so easily with something called "pass by reference". It works by defining the function as: function int changeNum(&num) Where the symbol & means "reference". However, this is (as far as I know) pretty much a C/C++ thing. We can work around it, however, in other languages like Lua. This requires a decent understanding of classes and objects. Just know that, classes are the templates to making objects, and they are basically "custom" data types programmers can write on their own. So we can have a "Person" class, with attributes like name and age (which has data types of String and int respectively), then we can mass produce people by making a ton of objects from that template. Weird analogy but I think it works (?). Moving on, primitive types are the basic building blocks of code. You've been using them already - int, double, boolean (true/false), char, etc. (Strings are objects btw because they are an array of char). What this basically means is that a String "references" where in the memory the first char is stored, and how many chars are after it, because we can only allocate so many data in a "block" (think binary 1s and 0s). We can't possibly have a whole chunk representing a string when they're just chars put together. If you see where I'm going with this, you're on track. Yes, we CANNOT pass by reference by doing function changeNum(num) because we're in Lua. But it's a different story if the parameter we're inputting is an object. Just make the primitive type into an object in any miraculous way possible. Store it in a table for example, idk lol. P/S: I haven't tested any of this second part but my guess should be right lmao you can test it on your own if it doesn't work uhh complain about it to me and I'll work on it. And some supporting evidence for my "shower thoughts": stackoverflow.com/questions/6128152/function-variable-scope-pass-by-value-or-reference
@ayo2740
@ayo2740 2 жыл бұрын
aye i appreciate your help
@Poopifylovescod
@Poopifylovescod 2 жыл бұрын
thank you OH MY GOSH
@josh-ug3qw
@josh-ug3qw 2 жыл бұрын
i understand it now but what would be the point of them if u could just print x,y or whatever u put
@Ghazi_Al_Tamimi
@Ghazi_Al_Tamimi 2 жыл бұрын
@@josh-ug3qw I don't know but it'll probably be more useful later on
@benryt
@benryt 2 жыл бұрын
mate thanks for that
@normalhuman1501
@normalhuman1501 3 жыл бұрын
Hotdogs are the student that always gets picked, if he calls in sick the teacher will just call him on the phone.
@valeriyaaslanov3254
@valeriyaaslanov3254 3 жыл бұрын
What
@Zenith_Nulls
@Zenith_Nulls 3 жыл бұрын
@@valeriyaaslanov3254 ok
@saints069
@saints069 2 жыл бұрын
I GET IT LOL
@kemonogane
@kemonogane 5 жыл бұрын
Helllo, U Helped me Alot Im Nomrallly an Animator for stickman figures then i learned how to Animate on roblox But then i said to my self, "I cant ony animate cause i dont even know how to put it in a key or how to make moves and Justu, punching,Magic etc Im so happy, i learned alot from you and u desserve more subs!
@TheDevKing
@TheDevKing 5 жыл бұрын
Thanks man :)
@jaydentt72
@jaydentt72 3 жыл бұрын
@@TheDevKing hi devking
@kevinduliesco5468
@kevinduliesco5468 3 жыл бұрын
@@TheDevKing hey Dev King can I add you on roblox?
@GoldenAyushRoblox
@GoldenAyushRoblox 8 ай бұрын
@@TheDevKingI don’t understand the function part in part 5,6,7 I just wanted to tell u it is ok if u ignore me :(
@EnderghostLD
@EnderghostLD 4 жыл бұрын
TheDevKing: i need a name hotdog: :I TheDevKing: ok, i'll use you
@blinkxero6756
@blinkxero6756 3 жыл бұрын
Even a 8 year old could become a scripter after watching this. I should know(:
@imdurpy4145
@imdurpy4145 3 жыл бұрын
@@blinkxero6756 are you saying you're an 8 year old?
@blinkxero6756
@blinkxero6756 3 жыл бұрын
No I'm not
@sushi7910
@sushi7910 3 жыл бұрын
@@imdurpy4145 i am around that age LOL i am learning script
@Zenith_Nulls
@Zenith_Nulls 3 жыл бұрын
@@sushi7910 did you learn it yet
@idarky4753
@idarky4753 4 жыл бұрын
Guys, if his explanation of parameters was confusing, I'll provide the explanation that worked for me. Basically, in his first example function, he writes: local function add(hotdog, ham) print (hotdog + ham) end Then the next line he types add(2, 3), and running the script puts 5 into the output. Basically, the function add() was defined as adding the two values in the parenthesis. In the first block of code, which acted like a definition of the function, the values are hotdog and ham. In the next line of code, which says print (hotdog + ham), it means that because hotdog and ham are in the parenthesis, it's gonna add the values hotdog and ham and print the result into the output. The function basically says, "If I have two values in my parenthesis, I will be adding those values and printing whatever I get after I added those values." So basically he used the parameters to help define what he wants his function to do and make it more useful in terms of what it can do. I like to think of parameters as parts of the definition of a function. Hopefully this was a helpful explanation.
@lionsdawn5242
@lionsdawn5242 4 жыл бұрын
Nice! Very simple and helpful. Thank you, man.
@theroomateisamuffin9524
@theroomateisamuffin9524 4 жыл бұрын
Thank you this made me understand it better
@margaretplayz2179
@margaretplayz2179 3 жыл бұрын
Tysm
@IX_4
@IX_4 3 жыл бұрын
@@theroomateisamuffin9524 K-K-K-K-KAKYOIN!
@theroomateisamuffin9524
@theroomateisamuffin9524 3 жыл бұрын
@@IX_4 everytime i comment someone says that lmao, you have a nice short name btw
@tepara_skates591
@tepara_skates591 4 жыл бұрын
hi i am litterilly watching this hole series all night he sun is just coming up
@ClassyGamesTM
@ClassyGamesTM 3 жыл бұрын
@@MrMr-oj7hl Best way to learn scripting is to do everything he does on the video whilst on RBX Studio, also once he does something key, try and copy what he just did but without looking at the video, until you remember it, so if you do that to everything, you will remember EVERYTHING.
@ClassyGamesTM
@ClassyGamesTM 3 жыл бұрын
@@MrMr-oj7hl Your welcome :)
@overk1lls755
@overk1lls755 4 жыл бұрын
great man, i watched your videos a long time ago but got caught up in some work so i forgot a lot, but its good to see that i had still subbed to your channel and now i can re learn it all! :)
@thyst7014
@thyst7014 5 жыл бұрын
here before 7,000,000,000 subscribers! dude your the best
@TheDevKing
@TheDevKing 5 жыл бұрын
lol
@zeptitan6037
@zeptitan6037 4 жыл бұрын
To be honest I think it should be 7.7 billion though
@pranavmoolan8524
@pranavmoolan8524 4 жыл бұрын
To be honest I think it should be 6.9 bilion though
@thyst7014
@thyst7014 4 жыл бұрын
@@pranavmoolan8524 lol true
@AdrianKlep
@AdrianKlep 4 жыл бұрын
this comment was a year ago and you still replied just now lol
@lacasadepapel4356
@lacasadepapel4356 5 жыл бұрын
Here before 6969 subs, I love your tutorials. I always wanted to learn lua, but all tutorials SUCKED, but yours is actually helpful. I will make the best games I can with all this when I reach the end of these tutorials
@Fluffernater
@Fluffernater 3 жыл бұрын
Omggg 69 FUNNInnumMABERRR RR R R R
@isandreww
@isandreww 2 жыл бұрын
this series of 4-12 minutes long videos have been more useful than a complete 48 minute long video ty so much(sorry for bad english)
@fluffypanda6024
@fluffypanda6024 3 жыл бұрын
Throughout the whole series I noticed something DevKing likes hot dogs
@VodkaDoge
@VodkaDoge Жыл бұрын
Somehow this is quite better than any guide i've seen, i'm already an amateur, i've coded a few simple games in roblox. yet this already started explaining in the most understandable ways thing i never understood even after 1 year of programming. sweet.
@toothcandle
@toothcandle Жыл бұрын
i jsut going through taking notes as i go, usually one page per video but im trying my bestg
@roatninthethird
@roatninthethird 2 жыл бұрын
the more i watch these tutorials and the more devking uses functions and variables, the better i feel. This truly is a beginners tutorial, thank you devking
@jadenquin6673
@jadenquin6673 4 жыл бұрын
I have watched up to now and so far, you have been so extremely helpful! The only thing I wish you would do is use the scripts in a way you would normally use it instead of printing Hotdog.
@practicalcucumber1395
@practicalcucumber1395 2 жыл бұрын
that would make it confusing for people who get lost easily. It's a lot more to take in instead of just the topic of the video.
@justarandomguywholovesanim726
@justarandomguywholovesanim726 2 жыл бұрын
@@practicalcucumber1395 maybe but for me its more confusing cuz i dont know how its supposed to be used it would make things less confising if he could like make a example with a script he normally uses this on so we know how its supposed/can be used
@demisemihemidemisemidescizxciv
@demisemihemidemisemidescizxciv Жыл бұрын
@@justarandomguywholovesanim726 for real
@JustSoren5789
@JustSoren5789 Жыл бұрын
he's trying to express his likings for hotdogs
@iideathlymusic3708
@iideathlymusic3708 4 жыл бұрын
You are so underrated. You’re tutorials are amazing and you deserve more subscribers and viewers! You are so friendly and id much prefer to watch your tutorials than anyone else’s because you explain them so much easier and you’re very understanding. ❤️
@iideathlymusic3708
@iideathlymusic3708 4 жыл бұрын
Lerua f
@iideathlymusic3708
@iideathlymusic3708 4 жыл бұрын
Lerua whoops
@meeeem7056
@meeeem7056 2 жыл бұрын
For anyone that's confused, parameter is basically a function variable. E.g local function add(x,y) if I call this function by doing: add(num1, num2) it's basically saying: x = num1 y = num2 This is assuming you already have variables outside of the function named num1 and num2 It might sound redundant at first, but you can do a lot with it, you just don't know enough to implement it.
@YelowBananaGamer
@YelowBananaGamer Жыл бұрын
@PubxKitty911 for this you dont have to add " on Sweet unless it is used at the bottom called argument
@Everythingisrussia
@Everythingisrussia Ай бұрын
THANK YOU SO MUCH I UNDERSTAND NOW!!!! Many hugs and *hotdogs* for you 😊
@ilzrogacha3638
@ilzrogacha3638 4 жыл бұрын
Alternate title: print but more complex
@HiBye-rq2mr
@HiBye-rq2mr 3 жыл бұрын
nope
@fixel5578
@fixel5578 3 жыл бұрын
@@HiBye-rq2mr 17h ago ok
@larryfranklin9106
@larryfranklin9106 3 жыл бұрын
more like local but more complex
@HiBye-rq2mr
@HiBye-rq2mr 3 жыл бұрын
fucking asked?
@hyterleaf754
@hyterleaf754 3 жыл бұрын
no its not print but more complex sorry if im being rude im not trying to be
@GarnetTheif
@GarnetTheif Жыл бұрын
I do recommend this tutorial to someone who's never learned a coding language before because if you already know a coding language you know like 80% of this course. It would be nice if there was a tutorial explaining their differences because the difference between most coding languages are small.
@johnnycrippledboy
@johnnycrippledboy 3 жыл бұрын
Your videos are so easy to understand and you actually explain everything you do,than just write some code and dont explain anything about it.Ty TheDevKing for your videos,they are truly brilliant.
@ok23-j9c
@ok23-j9c Ай бұрын
this guy exists yet people still dont know how to script this guy is a GIFT
@KapsiF
@KapsiF Жыл бұрын
Example 1. (using return from the last video) function Addition(a,b) local c = a+b return c end print(Addition(5,8)) -- The computer sees that we assigned 5 and 8 inside A and B. -- From that you can just think of it as like a math equation 5+8 -- Then we return the c which is 13 since we calculated how much 5+8 is we get 13. -- So just think of the things inside the () the same as you'd do when doing a variable -- It's just the same as this local a = 5 local b = 8 local c = a+b print(c) Here is the copy paste for the script shown in the video. function add(Hotdog, Ham) print(Hotdog) end add("Sweet", 2)
@sandpaper1711
@sandpaper1711 Жыл бұрын
so is there really any purpose to them? Do they like, make your game less laggy or something?
@KapsiF
@KapsiF Жыл бұрын
@@sandpaper1711 I think they are used like this. Lets say you have a input field where players can enter their names. So you just get the information from the input and put it in a parameter. This is what I think it is used
@KapsiF
@KapsiF Жыл бұрын
Also they do help in the long run of coding since it's easier to just edit the part in the () than changing every single mention of them in the function individually
@guarryReal
@guarryReal Жыл бұрын
Bro, I watched TONS of tutorials and none of them made me understand but u did. I will sub to you
@guarryReal
@guarryReal Жыл бұрын
local function amongus(imposter, crewmate) print(imposter+crewmate) end amongus(10,1)
@the_dcr_pro6712
@the_dcr_pro6712 3 жыл бұрын
My school : takes 2 years to get to function TheDevKing : your wish have came true
@nictactoe1496
@nictactoe1496 2 жыл бұрын
so if you guys came to it yet, parameters are just like substituting values in a math equation. you set the formula (or in this case, the parameters), and then u substitute the values to get the final answer. just a helpful guide if anyone found this confusing (pretty unlikely btw, he explained it great)
@user-do8jq4kd5z
@user-do8jq4kd5z 3 жыл бұрын
Example: local function multiply(arg1, arg2) return arg1*arg2 end local Variable = multiply(6, 2) print(Variable) it will print 12 because 6x2=12
@Quellyxx
@Quellyxx 2 жыл бұрын
This comment made me understand the video, thanks man
@p_fu
@p_fu 2 жыл бұрын
I was understanding the video but now I see your comment and it just ruined everything
@stuntfax9004
@stuntfax9004 2 жыл бұрын
Can u. Make it simpler
@mrplays0roblox615
@mrplays0roblox615 3 ай бұрын
if any are still confused after reading all these comments, this is the basic example. at 1:42 he states that he can put a value in and then he does, and at 2:42 he should've said "you're probably wondering, how does 3 and 2 make 5 out of hotdog and ham?" its because it added them in order. this is what i was confused with, hope others find this helpful.
@ggrelior3339
@ggrelior3339 4 жыл бұрын
local function add(Number1, Number2, Text) print(Number1+Number2..Text) end add(1,3," yas")
@eatmygames5870
@eatmygames5870 2 жыл бұрын
i've been scripting for 1 year and i never learned i just watched others and im really starting to grasp this
@retrogamer9111
@retrogamer9111 3 жыл бұрын
When you said functions might be getting a little boring now but I am actually enjoying learning how they work and how you give body to your function :) local function Me(Name, Year) print("My name is ", Name, ", it is the year ", Year, ".") end Me("Patt", 2021) I like to mess around and see what I can do with the functions, Hopefully I become a professional programmer in no time
@Kaiskatesz
@Kaiskatesz Жыл бұрын
Same lol
@Bbe78
@Bbe78 16 күн бұрын
for those who dont understand basically, lets say u type a parameter in the brackets ok? then u type print(name of parameter) u type both of the parameters. then u call the function at the end and then add the value u want inside the bracket. basically the parameters u first made dont have any value but after u call the function u add a value to the parameter and then it prints the value u gave to the parameter(s) to the output. hope this helped.
@Youtuber-sq2fj
@Youtuber-sq2fj 5 жыл бұрын
I am learning so much! I could not thank you enough! :D
@silviaavdala4964
@silviaavdala4964 2 жыл бұрын
omg brooo for the last few months i had a problem with understating parameters and arguments, now i finally got it!! thank you so much
@dusan310
@dusan310 4 жыл бұрын
This guy really love hotdogs... xD
@outfadingaway5400
@outfadingaway5400 Жыл бұрын
After attempting to educate myself on LUA Scripting, and many fails I've finally found a way. You truly made it easier for me to figure out the basics for scripting and taking notes on the logic and all the possibilities was amazing and very useful. Bravo.
@frankmkk2191
@frankmkk2191 4 жыл бұрын
Are you hungry watching these? 😂 Thank you so much tho!
@SuperHraza
@SuperHraza 2 жыл бұрын
Your tutorials are so simple and I love your jokes If I were to pick any KZbin tutorial i would choose yours :D
@ZZZ_Jaydee
@ZZZ_Jaydee 4 жыл бұрын
You explain it the best but I just don't know what to use any of these stuff for Can I please have a reply and tell me what to use functions for and other stuff!
@ZZZ_Jaydee
@ZZZ_Jaydee 3 жыл бұрын
Wow I use functions so much now, I am also making a game. The game is a car game. Instead of using he car chassis tune, I made my own, thanks to thedevking I can makes games now.
@Bababoyiscool
@Bababoyiscool 2 ай бұрын
The way you explain is so easy! I have liked and subbed with notifications on!
@itsmegreg9872
@itsmegreg9872 5 жыл бұрын
i'm eleven and im trying to learn as more as i can so it can help in future btw i want to be a game dev.
@TeamTrapMike
@TeamTrapMike 4 жыл бұрын
I'm in an entry level college computer science course and all of this is stuff we've been learning. If you can learn this stuff when you're 11 you'll be way ahead of most people, keep it up!
@TheBean42069
@TheBean42069 4 жыл бұрын
I wish I had have learned this stuff when I was 11 lol. this is a hobby for me but I just finished my first year of college so I have lots of time to practice now
@shinchanthebest
@shinchanthebest 4 жыл бұрын
very happy to hear but just don't expect it to be useful and take it as an hobby or POTENTIALLY useful because I have seen a lot of kids do it...just helping ;)
@SplashIs_
@SplashIs_ 4 жыл бұрын
@@TeamTrapMike Yeah he's right all of this will forever be needed in order to get into the complicated stuff.
@hollxie2298
@hollxie2298 4 жыл бұрын
@Mike C I’m actually 10 and almost in the advanced series. (:
@xoiuin
@xoiuin 3 жыл бұрын
i swear this dude will unknowingly teach someone that will become a popular roblox dev in the future
@snoop9064
@snoop9064 3 жыл бұрын
probably what happened with the creator of get a snack at 4 am. she mentioned thedevking in the credits page for his tutorials
@coolkidathome8203
@coolkidathome8203 4 жыл бұрын
You make everything so easy to understand, I tried PeasFactory AlvinBlox and many other channels and this is the only one that actually makes me engaged and I learn from it. You explain it well and short. So you don’t waste time for 8 minutes you get straight into it and you actually explain extremely well. Thanks man.
@zemadz7567
@zemadz7567 Жыл бұрын
parameters is just variables inside brackets and you can change their values anytime when you call (type the function) but its a bit specific in placement.
@Rickrolledhaha
@Rickrolledhaha 5 ай бұрын
Hello! I know I am late since this video is 4 years ago but, may i ask what print(Hotdogs) does in the code?
@Gorillix2024
@Gorillix2024 5 ай бұрын
Print(Hotdogs) tells the script to say "Hotdogs" in the output, the output is that thing on the bottom where all the numbers and letters are printed.
@justachillingcat
@justachillingcat 5 ай бұрын
@@Gorillix2024 and hotdogs = 3,2 so it prints 5
@2Qu1cK4uLol
@2Qu1cK4uLol 3 ай бұрын
Print(Hotdogs) basically tells the output section to say "Hotdogs" when you run the game, printing is mainly used to fix bugs, other than that it doesn't really have a use. Hope this helps!
@sparshgupta629
@sparshgupta629 3 жыл бұрын
Thank you TheDevKing, With all your videos till now, this is my Script : local function myFunction1() local MakeFunction = 76 print(MakeFunction*2) end myFunction1() local a = 5 local function myFunction2(e, s) local MyFavouriteNumber = 5 print (MyFavouriteNumber+a) end myFunction2(5, 19) local function ReturnCommand() print("This is my Whole script that I made") -- Script return("Wow, this is Advanced!") end local ReturnC = ReturnCommand() print (ReturnC)
@AngelShrimpChips
@AngelShrimpChips 4 жыл бұрын
But couldn't I just add a variable. Why is there no "2" when called with a string?
@EB-db1us
@EB-db1us 4 жыл бұрын
Because he calling "First "parameter with print its Hotdog .Look at top paramaters (hotdog"Firtstparameter",Ham"Second Parameter"). if he call print(ham) output will give 3x "2" because print calling "Second" parameter (sorry for my english)
@AngelShrimpChips
@AngelShrimpChips 4 жыл бұрын
@@EB-db1us Oh that's makes more sense.
@keen5760
@keen5760 Жыл бұрын
local function car(firstpart, secondpart, thirdpart) print("car contains", firstpart, "and", secondpart, "and", thirdpart) end car("engine", "windows", "frame") an example :)
@qrisquinn
@qrisquinn 4 жыл бұрын
If parameters are essentially variables, why not just define a variable (or local variable) for it? Why use parameters, that is what I am confused about.
@lost_spammer9984
@lost_spammer9984 3 жыл бұрын
Watch alvin bloxx his tutorial also explains about parameters check it out.
@zBleep
@zBleep Жыл бұрын
Damn, this is probably the only concept outside of printing that I learned without having to practice after, thank you!
@sebguydude8569
@sebguydude8569 4 жыл бұрын
For some reason I think returning is the easiest.
@yasameensami2967
@yasameensami2967 3 жыл бұрын
Same.
@MeowToonYT
@MeowToonYT 2 ай бұрын
Protect this man at all cost!!!!
@graspatjegaming
@graspatjegaming 2 ай бұрын
bot?
@baconhairawesomeyeah7528
@baconhairawesomeyeah7528 2 жыл бұрын
For ppl who are confused, basically parameters are like variables for example local function Stuff() In these () i want to find stuff. To save our time finding it using a function instead of using an variable to find it we use PARAMETERS so, to write an parameter we put the thing we want to find inside of the functions () and now the code would be local function stuff(stuff) Now, since we found it, I can use the parameter how much I want to use it (for me) now I would (for me) I would return "stuff" if successful. for example local function stuff(stuff) return true print(" returned"..tostring(stuff)) And as you see, I use stuff again cuz I was looking for stuff using an function. And yeah! Hope you understand.. and if you don't understand to tostring method.. I will create an video about tostring
@Safesplayz
@Safesplayz Жыл бұрын
thanks man this really helped a lot
@licanswok1789
@licanswok1789 4 жыл бұрын
bro u deserve way more views ur tutorials are great
@Chonmil
@Chonmil 2 жыл бұрын
Okay if you don't know, here's the conclusion, hope you'll like it :). : Basically we're like making values like Hotdog, Ham in the video. then we call the function and add those two values together. Hotdog, Ham = 3,2 and the "strings" are like words even tho they're numbers like "3" "79" "Test" Integers are numbers.
@youcancallmeantsgames833
@youcancallmeantsgames833 3 жыл бұрын
I watched the vid without sound and with subtitles and when he says 'the dev king' the subtitles say 'the deaf king" LOL nice vids BTW
@DanAndWiz
@DanAndWiz 3 ай бұрын
His tutorials are so good that I instantly understood what parameters are at 1:30
@urabus
@urabus 9 ай бұрын
if youre wondering how it was able to print the function even though the print was AFTER calling the function, its because the print is part of the function. the function IS printing, so when you call the function, youre just printing it. (i was pretty confused on this for a while so i hope this helps anyone else)
@wabi35
@wabi35 2 жыл бұрын
The Most Helpful Person I Ever Watched, Continue Bro
@inussahiscool
@inussahiscool 9 ай бұрын
I usually use scratch and this kinda reminds me of custom blocks
@surekhapitta2139
@surekhapitta2139 4 жыл бұрын
Wow easy understanding Every one should teach like you
@reallycoolnerdisreallycool
@reallycoolnerdisreallycool 11 ай бұрын
TheDevKing: **tries to think of an example for variables** TheDevKing: h o t d o g
@1Name8R
@1Name8R 11 ай бұрын
for those who are confused an easier way to do this is by doing local hotdog = 3 local ham = 2 now you've set the values into these variables/parameter's as you can see this is a bit easier and you don't have to do add(3,2) -- this is a bit confusing now you can do print(3,2) for those who are still having a problem this is how you do it function add(hotdog, ham) local hotdog = 3 -- btw this is what they mean by saying parameters' are just like variables because they are local ham = 2 -- telling the function what to do print(hotdog + ham) end) now do -- add() -- as you can see this is a bit easier then doing add(3,2)
@somu1605
@somu1605 3 жыл бұрын
What I learned for Parameters: local function bruh(No, Yes) Print(No) end bruh(Lol, Yes) When runned, it should print "Lol" in the output You can do the same with numbers: local function add(12, 31) print(12) end add(25, 90) When runned, it should print "25" in output.
@malt_y7280
@malt_y7280 3 жыл бұрын
This if true actually helped me understand it a lot better thank you tons mate
@mrnormalrobloxian5060
@mrnormalrobloxian5060 3 жыл бұрын
@@malt_y7280 Just try think of it a changing Variable eg. function Help(69,420) print(69) end Help(21,9999) should print 21 cuz we want to print 69 but we decided wanted to change it
@CentrallC4
@CentrallC4 Ай бұрын
@@mrnormalrobloxian5060 i know this is 2 years ago but i love you for this comment
@Double_Dead
@Double_Dead Жыл бұрын
You can also add variables when you define the parameter for example: local Number4 = 4 local function add(FirstNumber) print(FirstNumber + 2) end add(Number4)
@otheturtle4028
@otheturtle4028 3 жыл бұрын
I never thought I would enjoy learning
@franciscohernandez5765
@franciscohernandez5765 3 жыл бұрын
What can we use these scripts for? I’m trying to make a anime game and this isn’t helping very much
@backkslashhh
@backkslashhh 3 жыл бұрын
You can also return the sum of the two numbers by adding local sum before the equation. (Delete the print part if you do this)
@adeveanimations3889
@adeveanimations3889 9 ай бұрын
Still useful to this day!!
@d4coded
@d4coded 4 жыл бұрын
local function ThankYou(TheDevKing) print(TheDevKing) end ThankYou("Thanks for these amazing tutorials!")
@davidnatanael8542
@davidnatanael8542 Жыл бұрын
as a person who doesn't know scripting, i can confirm that i understand everything from this guy, other can't explain as simple as this guy
@noob_toxic1719
@noob_toxic1719 3 жыл бұрын
some other youtubers take 30 minutes to explain something this man takes 5 minutes to explain the same thing and 10x easier
@noobsarebetterthanu5820
@noobsarebetterthanu5820 2 жыл бұрын
He seems so sweet and optimistic and i LOVE IT he also tends to put hotdog in the scripts a lot lmao.
@brocockman5116
@brocockman5116 2 жыл бұрын
if you dont understand paramaters are literally just variables that can be changed but can only be used inside the function its created in
@rx7.teykhan683
@rx7.teykhan683 4 жыл бұрын
God give this man some hotdogs...
@gigachad4472
@gigachad4472 3 жыл бұрын
You're my best teacher!
@mladenk6069
@mladenk6069 2 жыл бұрын
This is what I think parameters are: Parameters are variables that can only be used by functions. Parameters are also a place holder. - Example ⬇ 1 - local function add(HotDog) 2 - print(HotDog) 3 - end 4 - add("Sweet") ----> it's gonna print Sweet because HotDog is like a place holder in this case it's for a Sweet, so if you type 1 - local function add(HotDog) 2 - print(HotDog) 3 - end 4 - add("Sweet") it will print Sweet This is only my thinking on what parameters are so if people who know what they are can they comment to help me? Thank you
@imrantube747
@imrantube747 2 жыл бұрын
Thank you
@mladenk6069
@mladenk6069 2 жыл бұрын
@@imrantube747 no problem
@CASHYASIR
@CASHYASIR Жыл бұрын
what does the , 2 mean?
@practicalcucumber1395
@practicalcucumber1395 2 жыл бұрын
In this case, hotdog was the variable that was holding the value "sweet" and the 2 next to sweet was used to give the variable hamburgers a value. So hotdog = "sweet" and hamburgers = 2
@eextras
@eextras 10 ай бұрын
thank you
@ordinarynerdofficial
@ordinarynerdofficial 9 ай бұрын
im still learning so correct me if im wrong but for people who dont understand Hotdog is the same as "local Hotdog = 3" and Ham is the same as "local Ham = 2" so when you print "print(Hotdog + Ham)" its like printing 3 + 2
@yum8837
@yum8837 3 ай бұрын
For anyone confused Parameters are basically variables that arent given a value until the function is called
@zaylek6568
@zaylek6568 11 ай бұрын
Manifesting that your tutorials will help me make a successful game from scratch
@WZNuget
@WZNuget 2 жыл бұрын
im getting back into roblox scripting i already know a decent amount of lua so im skimming through some of your videos to refresh my memory while getting ready for topics like events raycasting and who knows what because i sure as hell dont
@Targetstrike
@Targetstrike 3 жыл бұрын
I am surprised at how little confusion I have about all these, especially since I'm taking notes I got through scope and returning with a good idea of what it is
@Targetstrike
@Targetstrike 3 жыл бұрын
I already know printing by now because it does the same thing in python
@Ziedmac
@Ziedmac 2 жыл бұрын
thanks for the idea of taking notes, idk why I didn't think of that earlier! I kept forgetting everything from the earlier videos but just rewatched them and took notes
@justine3615
@justine3615 Жыл бұрын
You sure does love hotdogs xD btw nice tutorials i'm learning so much
@ishei5007
@ishei5007 3 жыл бұрын
bro istg i was so confused what parameters are and this just made it so clear
@thelastsliceofcheese9057
@thelastsliceofcheese9057 3 жыл бұрын
I think he was hungry when he was making this and he cant stop thinking about food.
@Code-002
@Code-002 Жыл бұрын
My man mentioning his bros Hotdog and Hamburger in each episode👍 Pure dedication to his homies👌
@bawad201
@bawad201 6 ай бұрын
Buld really just said "deaf king"
@spirtejiffy
@spirtejiffy 3 жыл бұрын
This this, is amazing I have learned so much after watching your other tutorials.
@Titan-qi9mv
@Titan-qi9mv 4 жыл бұрын
I like you more than alvinblox, i often have to replay alvinblox's coding videos multiple times to even know what he's talkin about. But i just have to watch your vids once and i know how stuff works.
@newbie8114
@newbie8114 3 жыл бұрын
:O! Hotdog is evolving! Hotdog involved into.. a... HotHamDog? 2:27
@Random-pc1cs
@Random-pc1cs Жыл бұрын
Pov: returning from advanced series to parameters cause you dont understand how parameters work and cant make the tool damage people
@offtopic9782
@offtopic9782 3 жыл бұрын
ive learned so much from this series on my first couple videos
@mtxfr
@mtxfr Жыл бұрын
Still very helpful in 2023!
@frobisthenoob
@frobisthenoob Жыл бұрын
Asian parents: My son invented calculus with a waterbottle Me: I learned to code with hotdogs
@divitor8413
@divitor8413 3 жыл бұрын
I feel there is more to explain with parameters, but this was a nice brisk explanation! Though I only recommend your tutorials for people who aren't really beginners...
@clownisfoundop7693
@clownisfoundop7693 2 жыл бұрын
it feels like your my math teacher but i actually have fun and i really do understand you nice tutorial
I Scripted Your Funny Roblox Ideas.. (Part 14)
8:08
TheDevKing
Рет қаралды 2,5 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
A Fan Asked Why His Game is Failing...
30:53
RoBuilder
Рет қаралды 149 М.
I Learned How to SCRIPT in 7 Days | Roblox
11:00
Simjet
Рет қаралды 112 М.
I Scripted Your Funny Roblox Ideas.. (Part 13)
6:37
TheDevKing
Рет қаралды 3,4 МЛН
I Made a Fake Warning to Scare Roblox Players
16:31
ByteBlox
Рет қаралды 1,4 МЛН
I Scripted Your Funny Roblox Ideas.. (Part 22)
10:32
TheDevKing
Рет қаралды 828 М.
I Asked Roblox Billionaires How To Get Rich
41:51
CubeINC
Рет қаралды 2,6 МЛН
I Scripted Your Funny Roblox Ideas.. (Part 16)
8:02
TheDevKing
Рет қаралды 6 МЛН
I Updated my Roblox Game in 1 Week!
16:51
SamRoblox
Рет қаралды 459 М.
Can 6 DEVS Make a STORY Game Without Communicating?
15:32
RoDev
Рет қаралды 2,3 МЛН