Events - Beginner Roblox Scripting #10 - [Long Edition]
Вставка
- Опубліковано 6 жов 2024
- Learn how to use Event listeners with Roblox scripting in this video. Event listeners are used to run functions when certain things happen in your game such as stepping on a part. This video is very long and I will make a shorter edition in the future so sorry about that.
Previous video: • Built In Functions - R...
Functions video: • Roblox Beginner Script...
Arguments/Parameters video: • Function Parameters / ...
Rest of the series: • Roblox How To Code - H...
Use Star code "AlvinBlox" when buying R$ or Premium
Become a Member today for exclusive perks and to support my channel!
► / @alvinblox
Subscribe to my UA-cam channel for more scripting videos:
►www.youtube.co...
► Watch my full beginner scripting series: goo.gl/k3erz2
Got video suggestions or feedback? Contact me via my website
►www.alvinblox....
Roblox username: Alvin_Blox
The music in this video is licensed from Epidemic Sound
www.epidemicsou...
So sorry it's so long! But it will teach you lots :) Events are really important in Roblox scripting! A shorter video will come soon in the future. Don't forget to use Star Code AlvinBlox when buying Robux or Premium to support the channel and check out Memberships by clicking the Join button! Thank you!
Hey can you make a Christmas gift calendar. PLZ
Hey, thank you! Everyone starts somewhere, wish you all the best in your development journey :D
One time I followed a tutorial for a chat controlled door, but I didn't understand any of it. Today I looked back at it, and I was like, this actually makes sense now. Thanks!
@@AlvinBlox I just finished watching the video, and my brain can't remember all the information! I can't seem to remember the last 9 videos either. I've been trying to experiment, but I just don't know where to start. I would do things like print, but that's all I can do.
Oh and I'm deciding on buying premium soon, so I'll make sure I get AlvinBlox star code in, don't worry.
I got mad respect for Alvin. There were no jumpcuts in that entire video, so he just sat down for an hour to teach us all coding. Alvin is amazing.
Yeah
Imagine trying to not messing something up for a whole hour
it also means he was more lazy about it
@@picklesthepro5729 Well he did it well enough there was no need for any jumpcuts
@@picklesthepro5729 How?
I love how he says "Your probably not understanding this" but i understand everything because he is such a great teacher.
Alvin should become a real coding teacher!
my mind is expanding by learning about events but losing its sanity by watching a one-hour long video about banana peels in roblox
Lmao ikr
this made me laugh
lol
i love comments like these that just make me very strongly outhale from my nose
banane
definitely one of the best scripting series there is on youtube, keep thriving alvin
@Walid ELFEKI I agreed
He agreed...
one of the best? u mean THE best, not even joking i mean who else does explain that good and slow so everyone understands it?
Philip Steinebrunner did you learn everything from this series?
@@ThaMentalGod2003 yeah
AlvinBlox, I am SO grateful to you for these videos. I used to code 20 years ago, and wanted to start coding in Roblox to help teach my kids about programming in a fun hands-on way... I was overwhelmed trying to jump into Lua / Roblox scripting and your videos were a Godsend! You are an excellent teacher, funny, and one of the smartest people I have encountered. And that is coming from a professor who teaches at the graduate school level (not in computer science lol)!
Wow. Great job for encouraging learning coding.
Alvin: “They’re actually quite simple.”
also Alvin: 53-minute video
All jokes tho! I absolutely love this channel❤️
Most of it is rhetoric to explain/remember, the problem is I have ADHD with a good long term memory, so this is largely superfluous. But at least I can change the speed. Hopefully the short version will come out where its an timeline of facts.
@@lunyxappocalypse7071 i got so excited until i saw this video, day 4 of trying to complete it, im currently on 12:00. It's nice to see someone who feels what i feel haha.
no its actually simple
I CAN FEEL THE KNOWLEDGE SURGING THROUGHOUT MY BRAIN!!!
I feel.....POOOOOWWEERRRRRR
It’s more knowledge than I can take...
Much better than i learned in school
ROBLOX SCRIPTING OVERDRIVEEEEEE
@@playlistabandonedaccount3275 is that a JoJo reference
Alvin it’s me bubble I’ve watched the whole vid and that is just Amazing you should become more famous for this. :D thanks for all the tutorials
@@user-mr3tw2jm9s i agree!
No
This type of content is very respectable because you don't put ads in your videos but you also put time and effort into them, which shows that you don't care about the revenue but you care about teaching the subject. Good stuff!
Every time I watch your vids I think to myself:"Its big brain time."
Same xd(:
lol
that was extremly unfunny
@@zea4989 ok yeah thats your opinion but you don't have to be a toxic person because of it.
Ealy E I felt that
Honestly, when people see the "53:09" they be like: "Hell naw".
*WATCH THE VID!! I LEGIT LEARNT SO MUCH!!*
Keep up the good work alvin! You make learning easier and more entertaining :)
Gotcha mate
60% percent of the video is just repeating of what he already said :D but still, he helps me a lot too and mayebe people need more help and longer video's than others
@@kamielbreyne7859 he says SO MUCH detail, I cant keep it all in my brain! REEEEEEEEEEEEE
Man, this was an OUTSTANDING video. Intended to cover events Alvin covers so much more. Please don't feel the need to apologize for sharing so much of your knowledge. Thank you!
People like me actually take notes when watching these videos so I can like go over all the stuff I have learnt so yh. Thanks for the help. Your effort is much appreciated and I hope your channel continues to succeed.
that was my first mistake when watching these vids. Now I take notes
haha yeah, i already have almost 5 pages full of notes! it's kinda dumb, but i'm also writing out the scripts and dissecting what they do in the notebook. hopefully it'll be useful in the future.
Taking notes is always the best thing to do
I just practice in real time when i watch his videos. I'm more likely to remember that way.
Just for those who don't understand what connect is for, it is basically connecting the event to the action (or function)
The best beginner roblox scripting series among all the other youtuber's i watched. didn't need to repeat the videoes to understand the concept.
Dude it’s 3:30 am and I’m hooked on learning from you, you explain it so well and have been the help I’ve been looking for. You are even helping understand c# a bit better which is my secondary language I’m learning. I just want to say thank you so much and keep up the amazing amazing work!
Go to sleep earlier plz
What the heck is 3:37 am for me
I am actually happy that u made a long video the thing is with short videos you go in detail and it makes me learn better and I feel satisfied
Just barely learning to code after years of growing up with roblox, telling myself i would grasp lua one day. These coding concepts are certainly hard, even for an adult, but im finally buckling down especially after reading all of you also trying to learn yourselves! Stay strong all!
I absolutely love the way you explain every single thing in the simplest way. You are simply the BEST. Keep going, Alvin. ❤️
finished this video and I have to say great videos! I have watched all 10 and have a better understanding of LUA thanks!
Thanks a lot Alvin for making this video, because I didn't know to much about events, this will really help me. :D
You're welcome, thanks for being a channel member!
AlvinBlox Alvin how to make an e to interact?
Ajay Nath ur donkey
@@ajaynath1036 e
I've learned so much from the first 10 episodes I can't wait to keep watching till the end of the series and watching his other scripting series too!
How's it going
@@fiqeen2340 hows it going 4 u?
@@yaaaa365 how's it going for you too???
@@temonixisaclownsimper8087 what about you???, im doing good
@@temonixisaclownsimper8087 hows it going for you?
Got into scripting yesterday, due to you, learned variables, functions, built in functions, parameters etc. Now I am here, I am looking forward to learn everything
Actually watched it until the last minute and understood 98% of everything. This is such a great series
I decided to learn lua because I was getting bored with csharp, your explanations are pretty straight forward and it was easy to understand, thanks
I THANK YOU SO MUCH, THIS IS SO USEFUL!!!! It has made touching scripts SOOOO much simpler to understand and write! THANK YOUUUUUUUUUUUUUUUUUUUUUUU! :D
It also made it way more accurate! :D :)
Same
This man is truely a god to me.. MAN I can't believe there's someone in youtube that can give such an explation on a topic like alvin does.. I learn several things like python, lua, blender, 3ds max, autodesk maya etc but the best tutorial channel among all is this guy. The example of events on 02:15 was magical! I got to know the base concept of events at the beggining and I've downloaded all videos from your website and I'm a premium member also on your website :)
Riyan Truely?
there is only one god
@@zibi1205 Hahah Bruh
Great series! I learn so much and have coded 3 games on roblox! Keep going Alvin!
I just started my journey learning Roblox Lua. You made scripting so much easier because of your tutorial series and I really appreciate you making all this educational content for us. You have gained a sub.
Dude youre such a legend, I watch 2 videos everyday of the series and learned more than one day in school. I know how instances and functions work ^-^
Five months later:
ALVIN I JUST MADE 500,000 THOUSAND OMG THANK YOU SO MUCH
I'm watching all of them at once...
those 50 minutes of my life was worth it. Thank you. This scripting series has taught me alot.
I’ve Been waiting for this!
For anyone wondering, you can also do this -
local Banana = script.Parent
Banana.Touched:Connect(function(hit) --Making the touched function
local humanoid = hit.Parent:FindFirstChild("Humanoid") --Telling the script to get the humanoid
if humanoid then --Checking if there is a humanoid
humanoid.Sit = true --Since there is a humanoid it now knows to run the script which will make the humanoid sit.
end
end)
Thank you so much for teaching us about events! WE really appreciate your time and efforts in this video!
This was so helpful I couldn't even script before but this series is the best
I love how u show and explain every small step instead of just doing it and typing ty for make it soo much easier
watched all 53 minute video.bro you are explaining everything so good.... i wasn't thinking i'm gonna learn lua while watching other channels but now i am feeling like big brain...thank you!
Don't worry Alvin I can watch it to the end for you
Hey Alvin! I know this a long time since the making of this video, but I just wanted to let you know that your videos are still helping people up to this far throughout the years. I'm in college and I've been coming back to Lua multiple times, so I decided to give your videos a try and I'm more than happy to say you're clearing up a lot of previous concerns and questions of mine so easily, so thank you for the great videos!
Thank you so much for making this video, this series, and this channel.
i am getting some progress in my roblox scripting, but without you i would be stuck on printing Hello world.
Your videos are so helpful Alvinblox! I just started scripting with lua, and i'm learning so fast because of you! Keep it up!
Great video! I know it was nearly an hour long but it was very useful. I've leaned alot from your tutorials and just wanted to say thank you if you see this!
Thank you AlvinBlox I’m new to scripting and this really taught me so much. I understand the functions and meanings of roblox code. Thank you Alvin you tried hard and I learned good.
To anyone having issues with the event firing on startup, this is what worked for me, you may have to try something a little different.
1, check if the part with the event is on the baseplate.
2, if it is, check to make sure the baseplate's property "CanTouch" is unchecked. if it isn't, try unchecking it. for me, the part was hitting the baseplate, causing the script to fire.
if anyone is curious, to my knowledge, "CanTouch" just determines whether or not it will trigger any Touch events.
yoo thx alot ;D
Yes!
I was looking at the comments to see if anybody had trouble with the baseplate starting the event.
I normally don't watch videos this long but there's something different about Alvin's tutorials, he manages to make his scripting tutorials exciting.
"You get it, connect it, and don't forget to end it"
Damn he's good
Watched the whole video and it was a lot.😰 But now I know everything about events. 🥳Thanks so much Alvin! Your the best! 👏
This is really well explained. I've learned a lot from your tutorials.
Thanks Alvin!
This is what we've been waiting for bois. this is it. the interesting part. Make sure you already know the basics! My hands are tingling from excitement watching this video
U better make notes
Thanks so much Alvin, Your really helping me out on my scripting Journey.
I watch every video as they come out and they are actually helping me to advance quite quickly, the level of detail is just perfect for me.
Hey! Your such a great UA-camr!!
this is the best explained video ive seen in a while. congrats!
Thank you for the tutorials! Good job. Small pointer... you tend to repeat the same information multiple times. I understand that you are trying to make sure you are being clear but you are not giving a lecture to a live audience. It's a video so if someone doesn't quite understand something they can re-watch the video. Repeating is good to emphasize a particularily important point, but isn't necessary for every step of the instruction set. This will also help to tighten up the video so you can give more new information in the same run time :) Thanks again!
True, he does repeat the same info a bunch of extra times, but he still is really good at explaining.
He repeats information to make it easier to understand, and so you don't have to re-watch the video. Imagine if your teachers only went over information once. Also, its much easier to retain knowledge if its told multiple times.
he epic yes
im learning so much, before i started to watch u all i knew was:
print("Hello World")
now i know about functions and properties, thank you man, you have helped me and countless others achieve what they thought wasnt possible!
billy hill how is covid going foru
Thanks AlvinBlox!
Honestly amazing, I didn't know lua was so easy to learn and you have taken me on this journey of becoming a scripter. I cannot thank you enough.
Hey alvin! you’re awesome!!
this is my third or fourth time trying to learn roblox luau, and this is the part i gave up on every single one of those times but i actually pulled through this time and it feels so good man cant wait to finish this series eventually and start making small projects
Same bro, I need robux badly and afk grinding on pls donate is so embarassing
@@that_on3_dude any luck dude?
"How can I know when I'm touching that banana." -AlvinBlox LOL
You are an absolute legend at explaining difficult stuff, it's probably easy for you, but me as a noob even understood it all without any problems.
Love your channel! Can you create a video on a car shop with in game currency? Thanks!
I never understood any of your vids before, but when I started playing around in rb studio and other scripting vids I started understanding and am so happy
Alvinblox:this is where it gets interesting
Me:"Interested"
Interesting...
@@celestial8616 interesting....
This is one of the most important tutorials ever. Every time I watch a tutorial where it uses "Connect:" all the time I get so lost! Now I finally know what it does. Thanks!
You're voice has changed last time I watched u is like 2 years omg lol
begone GTPS his testicals have changed posistions
Because he did the game.Workspace.Part.finishpuberty = true
@@lazlaz59 g4m3r move
Bro, this was so easy to understand, even though I never think anything is easy. You have proven me wrong, congrats.
Yesss events! Thanks so much, it's so hard for me to figure them out.
OMG THAT WAS THE MOST UNDERSTANDABLE TUTORIAL I'VE SEEN EVEN THO IT WAS LONG
it was that good, that i am as a person who started scripting LITERALLY yesterday made an own squid game bridge that works, changes color, and more, thank you so much (i am not creating a squid game, it was just for practice)
First Alvin video of december 2019 - must've been a pain to edit.
Omg i know u lmao
Bro this series is amazing i aint never seen somebody go into so much detail like all the websites on the first lesson doesnt teach me they just throw so much work at me i didint want to pay for a course and thought youtube wouldnt explain it good but this is 1000 times better keep going alvin
23:53 Just reminding me where I am
There is nothing funny on that time... Why you wrote this here? *cunfused*
@@caiigoo bruh read the comment, he says its reminder for him
@@jovic020 dont you get it, he's CUNFUSED(joking)
@@coolkid7377 yeah he should respect the cunfusion XD
Thank you so much I wanted to make a game for a long time but I didn't understand how to code a script but now I am keep learning every vid
Hello AlvinBlox! I would like a tutorial on how to know if a friend joins your game. I love these beginner videos!
This will tell you the name of everyone that joins the game
game.Players.PlayerAdded:Connect(function(returnedValue)
print("Hey " .. returnedValue.Name .. " Has entered the game")
end)
RESPECT !!!!!
man legit youtubers think 10min is a long vid enough for people to understand but damn man u think a lot about the future of scripting, i am ur fan i will share and do what ever i can, i know i am not greater than you but i will give a shoutout on my discord server and i hope you have a great day
Me: i am gonna script today
Output: tried to index nil with...
Me: *ragequits*
yesterday, i was whole day searching on internet about events, today i found you and i know it very good! Thanks Alvin❤ btw i watched even previous videos in this series but i like to experiment so i didnt see video. Youre literally god's bless, thanks for every video of yours!
events are used for number of things: from making NPC's hurt you to powering entire games. events (like if statements ) are very important things to know and it makes sense this video is hour long. now, events are basically things that happen, e v e n t s . they are used with built-in functions.
defining what we want,is touched,connecting it to a lambda, or anyonymous function
game.Workspace.Part.Touched:Connect(function()
print("ow why did u step on me :(") argument
end) ending the script
a example of an event there.
Oh my, I was rewatching your old vidoes with your kid voice again and my, oh my, your voice has changed quite the bit, glad to see you're still helping with scripting though, keep going!
Hello, I have one question. I made a berry bush with a script, so when I'm touching bush it creates a part. But when I'm touching bush, it creates a million of parts at once. Please tell me how to make the code run once each time I'm touching.
He did say he would cover that in a newer video, not sure when tho
you could do a temporary wait command that could wait for like, a billion seconds.
You use debounce so the part creation only happens once each time you touch the bush
finally someone who actually defines an anonymous function parameter
Can you make a tutorial on Remote Events? I’m confused when to use them, why, how, etc.
he has made one now
Thank you so much for all the tutorials! I've spent a bit of time watching things up until this one (and will continue to watch the others) and taking notes, but I kind of just feel dumber after watching certain things hahaha. I thought I was following ok up until this video but I feel like I need preliminary knowledge to better grasp what it is you're trying to teach sometimes. I feel like some people like me might benefit from an even slower way of teaching lol.
Could you do a video on how to do a pet shop? Thanks a lot!
That was a really, REALLY good tutorial, thank you very much for the patience to teach us all of this!
hey, make a video about how to make a Inventory and how to save items when you leave from game or something like that
i had to look at this vid and then write notes and trust me, it was... AMAZING. I RETAINED SO MUCH THANK YOU ALVIN
24:07 don't mind me just marking where I am cuz I have to sleep
@The king of Earth That's what I'm wondering...
@@joshuaangel614 Shhhhhh.... he's still sleeping
@@Axytitle Still?!
I love playing your games and learning from your videos
Everyone after watching this vid:
Now I determine reality myself
this is a great explanation of basic programming for ANY language.
Remember when GUI was known as "Gooey"?
I know a UA-camr who still says that, in 2020..
Who?
gooey
I was really having trouble figuring out how i was supposed to make anything actually do things until i got to this video and my mind was absolutely BLOWN!
at 15 minutes or so he said "It will definitely work, trust me" AND IT DIDN'T WORK FOR ME!!!
Ok, so actually, I was trying to do the touched command with a model instead of a part, because models can't have the touched command.
You should be able to just continue to the actual part within the model. i.e. game.workspace.model.part.Touched:Connect()
Idk if you can do it with a model im sure there is a way.
you could group the model
If you group the model then that means ur putting the model in a model tho, Right...? ;-;
IdK
Yeah you can do a touch destroy, clone, print, etc event on models only i believe
This guy is a legend all the scripts work he teaches us how the stuff works ,ect this man is a legend
18:23
Plz ignore this. This is just a marker to where I left off 😂
grrrrrrr
This was just the video I have been looking for, for a long time. Thank you very much for the amount of effort and in depth information you have talked about events! You just earned yourself a new subscriber as this really helped me learn more and gain a better understanding of events!
Me: Watches 1 min of the video.
Also me: Liked video, and leaves.
this is the best series about scripting oh man
just watched it and i love it