Roblox Module Scripts (The Right Way)

  Рет қаралды 25,137

qweekertom

qweekertom

Күн бұрын

Пікірлер: 53
@Andrew90046zero
@Andrew90046zero 10 ай бұрын
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.
@jnprge
@jnprge 10 ай бұрын
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
@Kitsune_Dev
@Kitsune_Dev 9 ай бұрын
it’s called Caching (Cache)
@Kitsune_Dev
@Kitsune_Dev 9 ай бұрын
@@jnprgeyou can’t anyway, it will error when requiring in parallel
@jnprge
@jnprge 9 ай бұрын
@@Kitsune_Dev you can outside of parallel tho, that is how i found the issue
@Fingeroo
@Fingeroo Ай бұрын
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.
@rafaelrodriguez777
@rafaelrodriguez777 10 ай бұрын
Every time this guy uploads a new video, my scripting skills go up like crazy.
@74L
@74L 10 ай бұрын
The real examples were very helpful! Thank you and please make more of this type of content!
@itso6778
@itso6778 10 ай бұрын
This channel is definately the step from going to intermediate to advanced keep up the stuff man
@ezrac704
@ezrac704 Ай бұрын
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
@juniorwizard-ek9zl
@juniorwizard-ek9zl 7 ай бұрын
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!
@Ethan-vx3ws
@Ethan-vx3ws 9 ай бұрын
You don't understand how much this helped me. God bless!
@keyblademaster8263
@keyblademaster8263 10 ай бұрын
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.
@YLVrbx
@YLVrbx 10 ай бұрын
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 🙏
@plugbydm
@plugbydm 10 ай бұрын
incredibly useful video (as always)!
@74L
@74L 10 ай бұрын
Agreed
@He_ze
@He_ze 9 ай бұрын
An extremely informative video, thanks for making this!
@customgunz00
@customgunz00 10 ай бұрын
idec about this video you seem like youre a saint brother, good stuff
@cemantical
@cemantical 10 ай бұрын
No wayyy this is the exact video I needed 😭 tysm
@TheManThatIsRay
@TheManThatIsRay 10 ай бұрын
I greatly appreciate your teaching style and the real world examples.
@HolyStudiosRBX
@HolyStudiosRBX 5 ай бұрын
Great video! Also can you make a video about the script coloring. I love the look of your script editor.
@zeaveer5399
@zeaveer5399 10 ай бұрын
Very useful knowledge. Thanks for this video !
@koainanis5840
@koainanis5840 10 ай бұрын
well done and nice explained. thank you and keep up the good work.
@cupofdespair7727
@cupofdespair7727 10 ай бұрын
needed this video omg
@DropperMaster
@DropperMaster 10 ай бұрын
The previous video is very good. I signed up
@DropperMaster
@DropperMaster 10 ай бұрын
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.
@koei3920
@koei3920 2 ай бұрын
Not all hero's wear capes. Cheers to you.
@KageNoDragon
@KageNoDragon 7 ай бұрын
Bro I love it it's like a father teaching us :0
@b2s652
@b2s652 Ай бұрын
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?
@sr32qawrq
@sr32qawrq 8 ай бұрын
This is awesome bro
@codexed-i
@codexed-i 10 ай бұрын
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.
@luigifernando_
@luigifernando_ 10 ай бұрын
actual goat 🐐
@wav8518
@wav8518 8 ай бұрын
vica chile
@skyblox-eo5se
@skyblox-eo5se Ай бұрын
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???
@lasanhadahora
@lasanhadahora 2 ай бұрын
why in bigger games you barely sees common server scripts?
@mist5023
@mist5023 9 ай бұрын
Great video
@ProxyGameDev
@ProxyGameDev 9 ай бұрын
Damn, you're good
@batbenrules8891
@batbenrules8891 3 ай бұрын
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
@Kitsune_Dev
@Kitsune_Dev 10 ай бұрын
can you talk about Test driven development and TestEz?
@yarik_superpro
@yarik_superpro 4 ай бұрын
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.
@vexillumination6074
@vexillumination6074 10 ай бұрын
Module scripts are amazing and save so much time
@liam2795
@liam2795 8 ай бұрын
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
@jso1
@jso1 10 ай бұрын
love this
@Sasuke46525
@Sasuke46525 10 ай бұрын
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
@Zoilu
@Zoilu 3 ай бұрын
What's the purpose of "name : string"
@terrazaeleh
@terrazaeleh 3 ай бұрын
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
@SilverSuperGamer
@SilverSuperGamer 8 ай бұрын
There is no single right way btw
@Beehopmew
@Beehopmew 9 ай бұрын
mate do you do private leasons ?
@qweekertom
@qweekertom 9 ай бұрын
Sadly no
@Tekleed
@Tekleed 10 ай бұрын
Peak
@WillProductionsTV
@WillProductionsTV 10 ай бұрын
FIRST
Item Shop in Roblox! (Like Fortnite)
14:43
qweekertom
Рет қаралды 3,4 М.
Roblox Code Review: Miner's Haven
16:59
foshes
Рет қаралды 98 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Roblox Devs, stop misusing :WaitForChild()!
17:13
Crusherfire
Рет қаралды 75 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 684 М.
Metatables are THIS SIMPLE
11:03
qweekertom
Рет қаралды 4,3 М.
I made a VIRAL Roblox Game in 3 days...
4:19
Kaizen
Рет қаралды 17 М.
What are Module Scripts? Roblox Scripting Explained
8:04
GnomeCode
Рет қаралды 158 М.
you SUCK at organizing scripts... Let's fix that!
13:12
Crusherfire
Рет қаралды 23 М.
What Roblox Doesn't Tell You | Roblox Studio
9:38
Stewiepfing
Рет қаралды 31 М.
METATABLES | What are they and how can we use them?
18:40
Crusherfire
Рет қаралды 27 М.
Why I Hate Roblox Simulators
16:42
ByteBlox
Рет қаралды 64 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН