One important takeaway from Module Scripts as well is, when you call require with a specific module, the code of the Module Script is only executed *once*, even if multiple scripts call require with that module script. But each time you do call require with that module, it returns the same data each time. So in the case of it returning a table, it will be the same table. So you could even use the module script to share mutatable data between multiple scripts.
another important tip: if you use an actor to contain your script, and if you require the modulescript, it WILL be executed again this will make another table you don't want, and is the main reason why i never use actors with modules
Be aware that this is dependent on the execution context of the scripts requiring the module. All server scripts that require a module will receive the same data, but local scripts requiring that same module will all receive a second set of data.
These videos will help you make the transition from intermediate to advanced. Play these videos a multiple times & your scripting habits will improve. Dont give up now the fact that you are here is proof enough that you came a long way from where you started.
I've never seen someone achieve a balance of accessible content for beginners while also promoting good coding practices. It's insane to see type annotation in the button style code
I love watching your videos, I really want to get better at making clean and good games, thanks to you im learning new stuff from you. Please if you can, Keep up uploading videos like this 🙏
I like how in Rust (my fav pr language) code is just in the src folder, so it is easy to organize, but on Roblox... i had to write a library to load scripts, but at least it is easier to scale/organize.
U should definitly make a game videos, but not like simulator games you know also i like ur videos ur life saver and keep making videos, while u are making videos make it with perfect orginazed
I would like to see a detailed video on how to clean up the garbage in the code. How to clean the OOP component after removal. I know about the "Debris" library. And I know roughly what "Destroy" should look like in OOP. However, many people are interested in this. And maybe it would be informative.
Hi! This type of programming using module scripts is new to me . May i know, lets say i have a module loader script and I have a gun . Do i add a local script in the gun so that that script can require and create a gun class???
there is another type: Module used to share table across multiple scripts. Video were not much usefull for me since i knew it but will be usefull for someone else definatly.
I don't understand the difference between utilities and functions. Can't I pass in data to either one of them and have them do something with that data?
How can I access the data that I put inside of Mosul script and place it in the workspace and that was done by sever script but how can I access that data from local script
One important takeaway from Module Scripts as well is, when you call require with a specific module, the code of the Module Script is only executed *once*, even if multiple scripts call require with that module script. But each time you do call require with that module, it returns the same data each time. So in the case of it returning a table, it will be the same table. So you could even use the module script to share mutatable data between multiple scripts.
another important tip: if you use an actor to contain your script, and if you require the modulescript, it WILL be executed again
this will make another table you don't want, and is the main reason why i never use actors with modules
it’s called Caching (Cache)
@@jnprgeyou can’t anyway, it will error when requiring in parallel
@@Kitsune_Dev you can outside of parallel tho, that is how i found the issue
Be aware that this is dependent on the execution context of the scripts requiring the module. All server scripts that require a module will receive the same data, but local scripts requiring that same module will all receive a second set of data.
Every time this guy uploads a new video, my scripting skills go up like crazy.
These videos will help you make the transition from intermediate to advanced. Play these videos a multiple times & your scripting habits will improve.
Dont give up now the fact that you are here is proof enough that you came a long way from where you started.
The real examples were very helpful! Thank you and please make more of this type of content!
I've never seen someone achieve a balance of accessible content for beginners while also promoting good coding practices.
It's insane to see type annotation in the button style code
This channel is definately the step from going to intermediate to advanced keep up the stuff man
You don't understand how much this helped me. God bless!
This was so helpful! I couldn't find a video with a simple explanation that shows you how to use module scripts properly, tysm again!
I love watching your videos, I really want to get better at making clean and good games, thanks to you im learning new stuff from you. Please if you can, Keep up uploading videos like this 🙏
I greatly appreciate your teaching style and the real world examples.
An extremely informative video, thanks for making this!
Not all hero's wear capes. Cheers to you.
idec about this video you seem like youre a saint brother, good stuff
incredibly useful video (as always)!
Agreed
Great video! Also can you make a video about the script coloring. I love the look of your script editor.
No wayyy this is the exact video I needed 😭 tysm
Bro I love it it's like a father teaching us :0
I like how in Rust (my fav pr language) code is just in the src folder, so it is easy to organize, but on Roblox... i had to write a library to load scripts, but at least it is easier to scale/organize.
U should definitly make a game videos, but not like simulator games you know also i like ur videos ur life saver and keep making videos, while u are making videos make it with perfect orginazed
Very useful knowledge. Thanks for this video !
Module scripts are amazing and save so much time
well done and nice explained.
thank you and keep up the good work.
actual goat 🐐
vica chile
The previous video is very good. I signed up
I would like to see a detailed video on how to clean up the garbage in the code. How to clean the OOP component after removal. I know about the "Debris" library. And I know roughly what "Destroy" should look like in OOP. However, many people are interested in this. And maybe it would be informative.
Hi! This type of programming using module scripts is new to me . May i know, lets say i have a module loader script and I have a gun . Do i add a local script in the gun so that that script can require and create a gun class???
needed this video omg
there is another type:
Module used to share table across multiple scripts.
Video were not much usefull for me since i knew it but will be usefull for someone else definatly.
I don't understand the difference between utilities and functions. Can't I pass in data to either one of them and have them do something with that data?
can you talk about Test driven development and TestEz?
This is awesome bro
Damn, you're good
why in bigger games you barely sees common server scripts?
so more specific question how would you edit smtn like an A chassis tune script because i cant even get it to change One variable in there
Great video
How can I access the data that I put inside of Mosul script and place it in the workspace and that was done by sever script but how can I access that data from local script
love this
There is no single right way btw
mate do you do private leasons ?
Sadly no
What's the purpose of "name : string"
It makes it so the editor itself knows what type of data it is. Useful for using functions on a string when it's not declared yet I believe
Peak
FIRST