How To Use ModuleScripts In Roblox Studio - Advanced Tutorial #1
Тәжірибелік нұсқаулар және стиль
Learn how to use module scripts on Roblox Studio with this Roblox scripting tutorial. Module Scripts allow you to call functions from different scripts and organise your code. I also go over the _G variable and why you should not use it.
Beginner Scripting Series: • Roblox How To Code - H...
Written guide: devforum.roblox.com/t/how-to-...
Support my work by becoming a Channel Member using the link below:
► / @alvinblox
Subscribe to my KZread channel for more scripting videos:
►kzread.info?sub...
► Watch my full beginner scripting series: goo.gl/k3erz2
Got video suggestions or feedback? Contact me via my website
►www.alvinblox.com/
Roblox username: Alvin_Blox
The music in this video is licensed from Epidemic Sound
www.epidemicsound.com
#ModuleScripts #RobloxScriptingTutorials
Пікірлер: 627
Every time i start your videos, my Google Assistant thinks you say "Hey Google"
This is what i was needing for a script in my game. Thanks for making this tutorial :)
Scripting is like math for me, it's fun when you know about it but it's hard and frustating when you dont know about it and this leds me hating it and trying to ignore it.
@CombinedHawk2555
3 жыл бұрын
learn math.random
@hydraulicfacechannel2147
3 жыл бұрын
on spot comparison
@Blergph
3 жыл бұрын
Math also is different than scripting, for math you solve problems to solve problems, for scripting you script to make cool stuff
@freevipservers
3 жыл бұрын
@@Blergph No, well yeah but you can use scripting to solve math problems or other things to.
@Bruno-yf9yh
3 жыл бұрын
Yes exactly. When you know Math it's so esy but when you don't know is hard. The more you know the more you learn xD
I've been looking for a tutorial like this for a while now. I really appreciate it and keep up the good work!
metatables would be cool to see in this series!
@memedatabase6146
4 жыл бұрын
Too easy
@williamlarsen3733
4 жыл бұрын
Mahdi Ahmed it’s not easy
@awaist
4 жыл бұрын
what are metatables
@vigneshvijayan394
3 жыл бұрын
I have seen this comment is some other vids too
@Boss-cv3uc
3 жыл бұрын
@@memedatabase6146 The whole purpose of AlvinBlox posting these videos is to *teach* people about Roblox Lua. It wouldn't make sense to only post things that are hard and forget about the 'easy' stuff ... That would defeat the whole purpose of an educational channel.
Thank you for starting the Advanced Series!!!
@AlvinBlox
4 жыл бұрын
Hope you enjoy it!
@GamingProNPC
3 жыл бұрын
@@AlvinBlox Thx Alvin!!
@CADEATERTOP3248
2 жыл бұрын
@@AlvinBlox thanks a ton
Oh man; I'm so thrilled. I have been asking for this one recently. I've been struggling with the documentation and other online explanations and really needed AB's take. I'm neck deep in development on my second game, and it's largely hard-coded. Very much appreciated.
This is really helpful for organizing code. for example; Admin Commands. Admin commands can get really messy when doing to commands themselves, the difference module scripts do is make less lines of code on 1 script, its not only this change, it changes the vision too. You will no longer have to scroll all the way down to find the system itself.
Omg thanks Alvin for doing these series again, been waiting for advanced script tutorials for a while, i already watched all your beginner scripting tutorials ❤
I just have to say, thank you for taking the time to make these, i started watching thedevkings tutorials and learned like the basics but i felt like i truly wasn't learning anything because he wasn't vividly explaining enough how things work and just expects us to "know" what they mean. Like for instance on his module scripts video, he didn't tell us we could call for modules from scripts OR put functions in modulescripts.. you're making the process of creating my first game more and more possible from each video, and i thank you dearly for that.
Hey Alvin, thanks so much, you've helped me improve my scripting abilities so much over the past few years! Congrats on 200k btw!
Module Scripts are kinda like object oriented programming, any script aka server script and local script can use them; they can be reused as many times you would like; They are very good for remote functions and you are passing arguments through
Oh my gosh. Congratulations on the 200k Subscribers!! I am so exceited to watch this. Just wanna say that, ive been here at 50k Good job alvin
@AlvinBlox
4 жыл бұрын
Thank you so much!!
WOW, this helped me out A LOT, I would not have understood this if it was not for your beginner scripting series, thank you for everything you do, without your scripting tutorials, I might not have been able to use it in situations where I need it the most and would have definitely not been where I am today
Yes, It’s FINALLY here! This video helped a lot, I used to be very confused on What a Module script does, so this helps!
Im so happy, for almost a year ive been trying to learn lua and everytime i gave up untill i watched your tutorials, youre amazing and im so so grateful, Thank you
Just started watching Alvin again after 3 years and I gotta say Puberty did you good, wowie
Your voice got a lot deeper Alvin and your style has changed over the years! Keep up the good work!
First of all, it was very helpful. Next of all. Learning to script is a bit hard, but learning to module script is harder than I tought. I do like your scripting tutorials.
Wow I was asleep when this was published Your great Alvin!!
This is so helpful! I wanted to make a game with abilities but I had trouble with making the abilities work in the first place, I hope this can allow me to bring ability data over to the player script to run it more clean and organized.
Perfect time to come out with this tutorial for me. I was just about to try and experiment with some module scripts in my game and this really helps a lot!
Thank god for this video, I was using module scripts completely wrong. No wonder I couldn't call my modules scripts from the main script. Thanks for the video!
So happy u started the advanced series
Finally. I’ve been stuck for I while not really learning much although I do know how to script well, but I hope this series helps me.
Every episode is new and unique and im always learning new and efficient ways to script before I begin my MainGameScript!
This legit saved my whole game. My scripts were so messy. Now i can finally see what i wrote
@spicybbqchicken
3 жыл бұрын
what game? i'll play it
@pavlova3310
2 жыл бұрын
yes pls send link
I’m half way through and this is incredible! I never knew I needed this but now I’m actually understand!
Nice video! I was a little confused with ModuleScripts before, but I get them now :D
Hi Alvin.. I used to watch your videos when I was a Roblox Player. But Now I am learning Coding so Now I can understand your videos more. Thanks
Thank you this helped me better ynderstand module scripts, i didnt really understand what they do and how they work so this tutorial helped me, thanks alvin!
Thanks for making these series your actually helping my scripting skills get better!
@AlvinBlox
4 жыл бұрын
Happy to help!
Wow this is really clear im learning well done
Hi AlvinBlox, even dough this' a advanced scripting tutorial you explain things very well that I think that for people that are new to scripting in roblox even can understand it, really good tutorial!
Absolutly Brilliant Tutorial! Definetly watching the rest! 👍
How long will it take for the next episodes? I already can't wait! You have done beginners tutorials twice, now is the time for advanced scripting tutorials :)
This was really helpful, The analogy was a really helped me understand everything a lot better. Thank you!
just finished the beginner series. Now its getting advanced. This will be fun! I like hard stuff :)
I was looking for these tutorials from you (the advanced scripting tutorials) :D
Awesome Alvin! Thanks so much! :D have a great day!
Ur doing a great job alvin keep it up bud
Thank you so much AlvinBlox really wanted this tutorial and yeah waiting for Piggy Shop Tutorial too! 😀
I finally know how to use module scripts now thanks Alvin!
Thanks you so much With out the tutorials I had no idea what to do and I was unmotivated So I nearly stopped and gave up now I can learn again!
This is super useful. Thanks Alvin.
I have been waiting for this.
You never made how to tween guis but I'm happy I learnt it, thank you for this tutorial :)
hi alvinblox! thanks for this video!!
Pls next episode: save and change properties of an object permanently real-time, and even if the server shuts down
@devingwithlowgonman5332
4 жыл бұрын
You can use DataStoreService to save a change to it
@haxis3764
4 жыл бұрын
hmmmmmmmmmmmmmmmmmmmmmmmmm yeah that sounds pretty good
@xumichael3090
4 жыл бұрын
There is something called datastore
@pplayer3187
3 жыл бұрын
u can try data store sercice
@noahnation331
3 жыл бұрын
Datastore every 20-60 seconds
I never thought this would be useful. But Today it was, Thank you alvin!
Woop Woop finally advanced tutorials, btw I have always wondered how to use module scripts
Thank you! I've been looking for a tutorial on Module Scripts! I've been coding since about late 2017 or early 2018 (even bought some books) but could never find out how to use module scripts!
TYSM ALVIN YOU ARE SO HELPFUL!!!
This is what I asked for on stream :)
this is actually so unbelievably useful thank you so much
Love it! Contiune making these good videos!!
YAY, A NEW MODULE SCRIPTS TUTORIAL :D
Alvin I'm trying to make a game for everyone to play and your videos have help me, Thank you so very much -plus I love your vids
Hey Alvin, thanks a lot for this video. I trying to get into OOP and I heard that Module Scripts are good for it, so I really want to learn how to use them!
Pretty helpful alvin. Im making a game then suddenly this video appeared. I can use this script. Thx dude Btw congratz for 200k subs
Finally, you've made another tutorial, thanks dude! :V
Hey! Love your videos!
Hey Alvin! I’m starting to get the hang of scripting but I think you need to do a few more tutorials, and I know you need suggestions so here you go! First suggestion: Do some Player tutorials, so if you wanted to a gui buttons with all the players in the game with their names on, how would you do it? And once they leave to get rid of that gui button! Second suggestion: Do a camera tutorial, so if we wanted to make a cutscene or change a camera angle for 1 player when they hit a button or for all players at a certain time, how would we do that? Lastly: If we wanted to do a random function at a random time, how would we do that? Just some suggestions, thank you for reading
@mixu_78
4 жыл бұрын
Gui buttons with player names on them: For each player in Players:GetPlayers() make a new guibutton and preferably parent it to a frame with an uilistlayout or other layout of choice, and store the button in a table like {[playeruserid] = guibutton}. Then when a player is removed look up their button from the table and :Destroy() it. When a player is added create new button, set the players userid to their button in the table of userids and buttons, and parent it to the place where you want the button to be. Random function at random time: Have a table of functions, wait math.random(min, max), then call a function in the table with functiontable[math.random(min, max)](). Add arguments into the () brackets, eg functiontable[1](argument1).
OMG FINALLY A TUTORIAL ON MODULES!
I always enjoy getting the notification seeing that you've uploaded!
Keep the good tutorials going!
Hello! Nice video series
Heck yes this is awesome btw congrats on 200000 subs!
@AlvinBlox
4 жыл бұрын
Thank you so much!!
This Video Is A Masterpiece, i Love it:D
i just made my own loadingscreen modulescript and its so easy to just get the module and use it, ty :)
Early!! :D Love your videos
For c/c++/java folks ModuleScript is a translatable unit which can be imported into another unit.
xD watching with the auto-generated subtitles is amazing. It gets most of it right, but every time you say module script it says random stuff and gets increasingly further away from module script like "model script" at one point, "mortal script" at 13:19, and then it gets even better. It's not even English anymore and it thinks you said "otaru script" at 26:32. Great video though. I've been looking for a more in-depth tutorial on mortal-I mean module scripts since I knew the basics, but I didn't *really* understand how it all came together until this video.
You are amazing alvin
YAY! I ASKED FOR THIS!!
Alvin I hopeeee you go on with this. Please like you had a beginner scripting series, you can do this advanced series, then a professional series
Don't worry, Piggy shop tutorial is still coming soon, I just haven't finished it yet. My Beginner Series is here: kzread.info/dash/bejne/dJqAt9Zsncmwmbw.html Written Guide Text Tutorial: devforum.roblox.com/t/how-to-use-module-scripts/572047
@challing1389
4 жыл бұрын
First reply
@TotallyNotBrisko
4 жыл бұрын
Finally, another upload.. I’ve been waiting for ages. Not dramatic, I swear.
@InfinitePlayzD
4 жыл бұрын
AlvinBlox Ok thanks. And also Idk why but my game works but It only works once or twice then stops. I did do a While wait() do. And could you please add a spectate gui
@THEKING-xk6vs
4 жыл бұрын
How do I make a skip stage dev product if my team names are the names of brick colors?
@MadGermanX_X
4 жыл бұрын
I am really happy That you are making does Series
YAY A KNEW ALVIN BLOX VIDEO
Even tough I’m already a Professional scripter I still like watching your videos
on the weekend i watched the entire beginner series and thought i had taken it all in, i came home and thought oh um well time to change my plans for that game
Great video learned so much
welp guys to learn scripting take ur time bcuz iv been scripting for over 3 years but i always did the same thing(making a game then stopping it) then i stopped scripting bcuz i lost motivation,now im starting all over again and im taking my time to learn everything
awesome, now I can understand the piggy tutorial series better :D
@AlvinBlox
4 жыл бұрын
Glad you think so!
@tangosf98
4 жыл бұрын
hey, what the? i saw you in a reply
Suggested videos for the future: Tutorial on pathfinding? And also making NPCs communicate and talk? Would be nice to break these down and get these explained in your style!
omg yes alvin!!! Thank you
Wow Dry, will be so us full as I just repeated script like 5 times today, I did get something right about the script though, that they are like a setting thing, they hold values like a games setting page
YAY YOU FINALLY MADE THE ADVANCED SCRIPTING TUTORIALS!!!! AHHAHHAHH MY BRAIN AHH ARH THANK GOODNESS AHHAHHAHAHHAHAA
You help me so much in scripting :D tanks u
wow this is very useful for scripting I will learn more on how to use them until I completely have mastered it 👍 👍
love the channel!
Please consider a tutorial on Premium player benefits and how to code them into your game. You are all about helping devs make money and this is going to be the new big thing in the future imo.
Yo need soo many more subscribers dude!
This is so much better than my teacher at school could ever do lol thanks so much
i cant believe ive graduated from beginner scripting!
THANK YOU SO MUCH!
Wow I havent been on your channel for like a year or two but holy crap your voice got deep
Yesyesyes advanced scripting!!
Thanks i fixed my lighting
Yes!! It's finally out!
@AlvinBlox
4 жыл бұрын
Yup :D
The beauty of simplicity.