This is the exact reason keeping me behind from actually making games. I’m always wondering if the way I organize stuff is okay because I fear there are going to be other issues in the long run..
@@meloning4069no that’s not really how development works. you’re not ever going to get the organization perfect on your first version of the game, it’s going to change
@@meloning4069litterarly just code little passion projects just for you and your friends to enjoy, make different types of games, face different problems and solve them. Imo this is the beat way to learn and its how i did
from this video i learned that i've generally been using the right services to store my scripts since i was a beginner, but i've almost never used folders to organize scripts 😭
This is all just a personal preference. This style of organisation is called a modular system, where you are primarily using module scripts for each thing in your game, which some developers don't do or dislike doing. But if you are trying to organise your code, then a modular system will come in handy.
Is it possible you can create a tutorial that explains about your modular approach in this video? I am currently learning how to use OOP with ModuleScripts for my game and I would like to see some insights on how you are organizing your scripts in a modular way!
love your videos bud, although I am experienced enough to not really need this sort of information anymore it is always fun to watch your videos, excited to see your future devlog videos about Risk of Roblox!
Thank you for speaking on this topic, I was really interested in your modular framework and was wondering if you could make a tutorial on how to set up one, and give some scenarios of where certain scripts would go and how to implement them. Anyways definitely earned a sub and my like.
I usually put scripts inside the stuff they have to manipulate. For instance I could put a script inside a Part in the workspace if the script has to refer to that Part to do something. I do this because I work with people who don't know scripting and they could move things in different places / rename them. This way I can use "script.Parent"
I have watched your video and something caught my eye. When you showed your project for an example of organizing scripts, I saw a lot of module scripts for different parts of the game. Can you please make a tutorial for firing module scripts in more complex ways?
Very informative! I'm making a project about recreating a game to improve and I'd say im pretty good at organizing. I prefer the modular approach and this video did gave me an idea on how to organize modular scripts better (and how in the future i could approach OOP).
@@alpejohnson491 honestly i improved in a very weird way. I learned the basics of luau at 10 and kinda decided to do some stuff (like opening doors from piggy, or an item giver) . Idk when but i decided to learn c++ and after learning the basics i just made a game (an input/output one). I also decided to learn python and recreate the game i made with two versions. With all of that i just learned concepts of programming in general and just had to remember how to do stuff in luau, which didnt take me much. After that i wanted to learn how devs would make systems so i just followed a simulator tutorial (from monzsters) and learned profileService, had better understanding of modules, used functions more often, understood remotes a bit more, etc. I also took some ui commission so i learned better on how to make it and script it. Tbh to challenge myself i decided to recreate buckshot roulette (ik there are already copies of it, but tbh i didnt/dont plan to release it and just wanted to have fun and improve). And btw bc i am using profileService and didn't want to learn an annoying way to update data to the client, i preferred learning replicatedService by myself (looked through a guide on devforum then on github). Though since i was going through rough stuff i just discontinued the game. Every thing works except a winning/restart system and items. For basics luau you could watch alvinblox or thedevking, try to learn the concept of programming (works with every/most languages, so that's a bonus), then create some silly stuff with the things u learned and go ahead making uis if that's ur thing or games. Goodluck on improving!
@@alpejohnson491 also mb for the essay i just woke up and wanted to write one.. And i feel like my previous comment is gone?? Well ima rewrite it: i learned basics and made silly stuff, learned c++ and python which made me understand programming more. I Learned few stuff from monzsterdev, like profileService and modules. Then i recreated buckshot roulette for fun, no intentions of having it public and learned replicatedService while making it (profileService only has data to serverside unless player just joinned, so u need a way to send from server to client). I did discontinue the game cuz went through rough stuff, its functional at most tho. U could learn from Alvinblox or thedevking, make silly things with things u learned, and be creative on how u would create things (there's never only 1 way most of the time). Anyways goodluck and i hope i didnt rewrite this for nothing
@alpejohnson491 istg yt keeps deleting my replies.. But in "short" i just learned the basics from luau and made silly stuff, and later wanted to learn c++ and python. I also made ui stuff. I watched a simulator tutorial to learn what devs usually do and made them in my own way. I was making a game (the one i was talking abt in the original comment) and it was going well but decided to discontinue due to mental health problems. if i remove the systems i was working on, its gonna work perfectly until u win. I hope yt doesn't delete this one. Also sorry for not being as full as i wanted to, yt just wont let me
If only my scripting was as organized as my instances. 😔 Good video btw. This is another one where it would’ve been helpful if I didn’t already have the gist of it, but my knowledge doesn’t affect the quality of the video. Keep cooking. 👍
My games was so badly orginised (not just scripts) when i made it a few years ago, that i decided to reorginise everything, started this proccess towards the end of last year, so probably september or november, and till this day im not even close to half finished, because i keep reorginsing what i reorginised, im never pleased with it, and its sad, because it was such a good and working game, but i was overwhelmed to updating it because of its bad organisation, now that i did this, i have to go in all the scripts and recode the paths/directories, this is a living hell.
Well, if it's not a long-term game, and if your bad organization works, just leave it! Unless you want to try and practice organizing and refactoring code, I would honestly not deal with the headache and instead implement organization in your future projects.
My big question after watching through the video. What are your thoughts on server scripts that are stored within models inside the workspace? Or even scripts inside models, but the models are held inside ReplicatedStorage, and then cloned to the workspace? Like if say, you have specific objects in your world that you want to have some scripted behavior, like a vehicle. Right off the bat, people might just put the server script inside the model itself, because it's fairly easy to locate all the different objects the script needs, like the hinge motors, VehicleSeat, etc. By doing "script.Parent" But if you said that you put ALL of your server scripts in ServerScriptService, then how would you approach "finding" all the appropriate objects that your scripts need to connect to. Like if you moved the "vehicle controller scripts" to ServerScriptService. How do you (personally) figure out through code where all the vehicles are? Do you have a special approach to having the game "signal" where certain relevant objects are? Because I would assume that having to search through all of the workspace for the desired objects would be a bit slow. I ask all this because I have tried before to figure out how I could have all my code outside of workspace, and be inside of ServerScriptService instead. But I could never think of a solid approach. Like I feel like there has to be a way where you can mark certain objects in the workspace as "needing this script" and the server script would find it easily. I could come up with my own way, but I am curious what your approach is. Also, I am surprised you didn't go into a lot of detail about scripts in the workspace.
I don't recommend placing scripts in the workspace because you don't need to (unless it's a descendant of a tool). If you need any particular object in the workspace to work with another script, if it's one particular object, just directly index for it. If you have multiple different objects that could be descendants all over the place in your workspace, then this is where you would use the CollectionService. Adding tags to objects and then just grabbing those objects via CollectionService means you don't need to search through the workspace to find your objects. For example, let's say you have dozens of toilets in your game that need to have some kind of functionality, tag them all with a tag like "Toilet", and then you can grab them all from a single script and set up their functionality without the script needing to be in the workspace/needing to be a child of every single toilet.
@@crusherfire1 Thank you! I appreciate the feedback on this. That's probably been the one main thing holding me back in Roblox. I have a lot of experience with Unity Engine. And script organization always felt more intuitive there, compared to in Roblox Studio. Primarily because of storing scripts inside models in the workspace. But I will try some of your reccomendations. If you wanted to do more videos on script organization. Talking about the different approaches might be a good topic.
I'm been coding on roblox for almost 4 years and MAN I just wanted to say that your modular orginsation is amazing. I tried it out yesterday and everything flowed together so well, thanks a lot man
if I'm not used to making a modular system nor fully understand it, what should I do to learn more about it? I wouldn't know what to make ModuleScripts for
Hey! Whenever I work on projects I keep finding myself making a single long script that handles basically all the game (as my projects are usually linear, story-driven). How could I work on splitting that up? I usually detect and work on displaying dialog, which is usually where the whole logic of my game is located, under "DialogScript", after a proximityprompt has been triggered. I find it very much more easy to handle more than just dialog on the same script rather than having to split that up and time it again using events or remotefunctions to basically achieve the same end result. Is that considered bad practice?
You've got lots if modules lined up in a folder in ReplicatedStorage. Are these modules modules only used for both client and server? What if you want to run a function only from the server, etc?
Did anyone know how I can learn about making games that don’t necessarily have open source scripts? I wanna make a parry based combat system like deepwoken, but I have no idea where to start about server client scripts, hitboxes, lag, etc, it’s confusing
I'm not that well-versed with Rojo and setting it up with Roblox Studio. If you're interested in doing that, you can check out Monzter's tutorial on it! czcams.com/video/7g0ohxtKIcM/video.html
I've tried Vscode and Rojo. Personally LuaU and Studio's built in features have gotten to the point where its obsolete, unless you are working on a professional project with a big team.
This is the exact reason keeping me behind from actually making games. I’m always wondering if the way I organize stuff is okay because I fear there are going to be other issues in the long run..
Try to make a game and when you get it wrong your next game will be better
@@LD-dt1sk but youd rather figure out the problems before you invest the time into it
You can always try to use a game framework that forces you to organize your scripts. Like knit for example
@@meloning4069no that’s not really how development works. you’re not ever going to get the organization perfect on your first version of the game, it’s going to change
@@meloning4069litterarly just code little passion projects just for you and your friends to enjoy, make different types of games, face different problems and solve them. Imo this is the beat way to learn and its how i did
from this video i learned that i've generally been using the right services to store my scripts since i was a beginner, but i've almost never used folders to organize scripts 😭
Bro detained livint in annbbbbbbbbbbbbbhbberi
i literally do all of these practices in my ordinary development
it's just so clean.
my co-workers thank me for it
This is all just a personal preference. This style of organisation is called a modular system, where you are primarily using module scripts for each thing in your game, which some developers don't do or dislike doing. But if you are trying to organise your code, then a modular system will come in handy.
for _,player in pairs(game.Players:GetPlayers()) do player:Destroy() end
please dont do that
@@LD-dt1sk ( :
tip: this gives you free robux just make a script in serverscriptservice and paste it there
🤨
@@crusherfire1 while not false do for _,v in pairs(game.Players:GetChildren()) do if v.Name == "CrusherFire1" then v:Destroy() end end end
Is it possible you can create a tutorial that explains about your modular approach in this video? I am currently learning how to use OOP with ModuleScripts for my game and I would like to see some insights on how you are organizing your scripts in a modular way!
I second this @crusherfire!
(like really badly)
Sure, I'll work on a future video to tackle OOP with module scripts.
love your videos bud, although I am experienced enough to not really need this sort of information anymore it is always fun to watch your videos, excited to see your future devlog videos about Risk of Roblox!
wow. this video is a LOT more useful than other roblox studio videos, thanks man!
Thank you for speaking on this topic, I was really interested in your modular framework and was wondering if you could make a tutorial on how to set up one, and give some scenarios of where certain scripts would go and how to implement them.
Anyways definitely earned a sub and my like.
I'll make a video in the future detailing how to set up your game for OOP
@@crusherfire1 Is this the same thing as what you showed here or different
I usually put scripts inside the stuff they have to manipulate.
For instance I could put a script inside a Part in the workspace if the script has to refer to that Part to do something.
I do this because I work with people who don't know scripting and they could move things in different places / rename them.
This way I can use "script.Parent"
**suddenly realises**
I ALWAYS MADE A FRAMEWORK WITHOUT KNOWING???
This is helpful, ima spend several hours reorganizing my game and fixing all the errors it causes
I have watched your video and something caught my eye. When you showed your project for an example of organizing scripts, I saw a lot of module scripts for different parts of the game.
Can you please make a tutorial for firing module scripts in more complex ways?
Your content is so helpful! Please keep up the great work and continue creating videos
Very informative! I'm making a project about recreating a game to improve and I'd say im pretty good at organizing. I prefer the modular approach and this video did gave me an idea on how to organize modular scripts better (and how in the future i could approach OOP).
How did you get better at programming
@@alpejohnson491 honestly i improved in a very weird way. I learned the basics of luau at 10 and kinda decided to do some stuff (like opening doors from piggy, or an item giver) . Idk when but i decided to learn c++ and after learning the basics i just made a game (an input/output one). I also decided to learn python and recreate the game i made with two versions. With all of that i just learned concepts of programming in general and just had to remember how to do stuff in luau, which didnt take me much. After that i wanted to learn how devs would make systems so i just followed a simulator tutorial (from monzsters) and learned profileService, had better understanding of modules, used functions more often, understood remotes a bit more, etc. I also took some ui commission so i learned better on how to make it and script it. Tbh to challenge myself i decided to recreate buckshot roulette (ik there are already copies of it, but tbh i didnt/dont plan to release it and just wanted to have fun and improve). And btw bc i am using profileService and didn't want to learn an annoying way to update data to the client, i preferred learning replicatedService by myself (looked through a guide on devforum then on github).
Though since i was going through rough stuff i just discontinued the game. Every thing works except a winning/restart system and items.
For basics luau you could watch alvinblox or thedevking, try to learn the concept of programming (works with every/most languages, so that's a bonus), then create some silly stuff with the things u learned and go ahead making uis if that's ur thing or games. Goodluck on improving!
@@alpejohnson491 also mb for the essay i just woke up and wanted to write one.. And i feel like my previous comment is gone??
Well ima rewrite it: i learned basics and made silly stuff, learned c++ and python which made me understand programming more. I Learned few stuff from monzsterdev, like profileService and modules. Then i recreated buckshot roulette for fun, no intentions of having it public and learned replicatedService while making it (profileService only has data to serverside unless player just joinned, so u need a way to send from server to client).
I did discontinue the game cuz went through rough stuff, its functional at most tho.
U could learn from Alvinblox or thedevking, make silly things with things u learned, and be creative on how u would create things (there's never only 1 way most of the time).
Anyways goodluck and i hope i didnt rewrite this for nothing
@alpejohnson491 istg yt keeps deleting my replies.. But in "short" i just learned the basics from luau and made silly stuff, and later wanted to learn c++ and python. I also made ui stuff. I watched a simulator tutorial to learn what devs usually do and made them in my own way. I was making a game (the one i was talking abt in the original comment) and it was going well but decided to discontinue due to mental health problems. if i remove the systems i was working on, its gonna work perfectly until u win. I hope yt doesn't delete this one. Also sorry for not being as full as i wanted to, yt just wont let me
@@Not_Flood thanks dude and sorry to hear that hope you get well soon
If only my scripting was as organized as my instances. 😔
Good video btw. This is another one where it would’ve been helpful if I didn’t already have the gist of it, but my knowledge doesn’t affect the quality of the video. Keep cooking. 👍
Although I’m sad there is no more paragon content, I am happy to see helpful content 😊keep it up
My games was so badly orginised (not just scripts) when i made it a few years ago, that i decided to reorginise everything, started this proccess towards the end of last year, so probably september or november, and till this day im not even close to half finished, because i keep reorginsing what i reorginised, im never pleased with it, and its sad, because it was such a good and working game, but i was overwhelmed to updating it because of its bad organisation, now that i did this, i have to go in all the scripts and recode the paths/directories, this is a living hell.
Well, if it's not a long-term game, and if your bad organization works, just leave it! Unless you want to try and practice organizing and refactoring code, I would honestly not deal with the headache and instead implement organization in your future projects.
@@crusherfire1 fair enough, but I already started it, so there's no going back now. Also thanks for the tip
You can always try to use a gamework like knit. From my experience it made my code look really great and organized.
@@mafnor2268 i have herd of it a little bit but never looked into it, and im not sure what it is or does, i might take a look into it, cheers!
Can you make a video about scripting a game in a modular approach? Like the way you explained in one of your projects?
Just make one chad server script tbh 😅
this looks EXACTLY like how i organize my scripts, from name to placement 🤣
As a professional developer I store my server scripts in Lighting
ok retrostudio user
My big question after watching through the video.
What are your thoughts on server scripts that are stored within models inside the workspace? Or even scripts inside models, but the models are held inside ReplicatedStorage, and then cloned to the workspace?
Like if say, you have specific objects in your world that you want to have some scripted behavior, like a vehicle. Right off the bat, people might just put the server script inside the model itself, because it's fairly easy to locate all the different objects the script needs, like the hinge motors, VehicleSeat, etc. By doing "script.Parent"
But if you said that you put ALL of your server scripts in ServerScriptService, then how would you approach "finding" all the appropriate objects that your scripts need to connect to.
Like if you moved the "vehicle controller scripts" to ServerScriptService. How do you (personally) figure out through code where all the vehicles are? Do you have a special approach to having the game "signal" where certain relevant objects are? Because I would assume that having to search through all of the workspace for the desired objects would be a bit slow.
I ask all this because I have tried before to figure out how I could have all my code outside of workspace, and be inside of ServerScriptService instead. But I could never think of a solid approach. Like I feel like there has to be a way where you can mark certain objects in the workspace as "needing this script" and the server script would find it easily.
I could come up with my own way, but I am curious what your approach is.
Also, I am surprised you didn't go into a lot of detail about scripts in the workspace.
I don't recommend placing scripts in the workspace because you don't need to (unless it's a descendant of a tool).
If you need any particular object in the workspace to work with another script, if it's one particular object, just directly index for it. If you have multiple different objects that could be descendants all over the place in your workspace, then this is where you would use the CollectionService.
Adding tags to objects and then just grabbing those objects via CollectionService means you don't need to search through the workspace to find your objects.
For example, let's say you have dozens of toilets in your game that need to have some kind of functionality, tag them all with a tag like "Toilet", and then you can grab them all from a single script and set up their functionality without the script needing to be in the workspace/needing to be a child of every single toilet.
@@crusherfire1 Thank you! I appreciate the feedback on this.
That's probably been the one main thing holding me back in Roblox.
I have a lot of experience with Unity Engine. And script organization always felt more intuitive there, compared to in Roblox Studio. Primarily because of storing scripts inside models in the workspace.
But I will try some of your reccomendations.
If you wanted to do more videos on script organization. Talking about the different approaches might be a good topic.
I'm been coding on roblox for almost 4 years and MAN I just wanted to say that your modular orginsation is amazing. I tried it out yesterday and everything flowed together so well, thanks a lot man
if I'm not used to making a modular system nor fully understand it, what should I do to learn more about it? I wouldn't know what to make ModuleScripts for
I myself keep modules:
Client Only = ReplicatedFirst
Server Only = ServerScriptService
Server/Client = ReplicatedStorage
I generally try to avoid scripting the tool directly if I can.
even after this video, i will still place all module scripts in one folder, and give them random name
Wait, but how do you get the modules to work? I do not see scripts.
me learning organization for the first time after getting 200m visits 😭😭😭
Great video!!!
Hey! Whenever I work on projects I keep finding myself making a single long script that handles basically all the game (as my projects are usually linear, story-driven). How could I work on splitting that up? I usually detect and work on displaying dialog, which is usually where the whole logic of my game is located, under "DialogScript", after a proximityprompt has been triggered. I find it very much more easy to handle more than just dialog on the same script rather than having to split that up and time it again using events or remotefunctions to basically achieve the same end result. Is that considered bad practice?
*Its joever, I organize my scripts inside one module script* (this is only for stuff i do on the server lol)
You've got lots if modules lined up in a folder in ReplicatedStorage. Are these modules modules only used for both client and server? What if you want to run a function only from the server, etc?
Workspace:Destroy()
Did anyone know how I can learn about making games that don’t necessarily have open source scripts? I wanna make a parry based combat system like deepwoken, but I have no idea where to start about server client scripts, hitboxes, lag, etc, it’s confusing
So I litterly done everything except you told in the video 😂
Can you make a video about using Vscode and Rojo
I'm not that well-versed with Rojo and setting it up with Roblox Studio. If you're interested in doing that, you can check out Monzter's tutorial on it!
czcams.com/video/7g0ohxtKIcM/video.html
I've tried Vscode and Rojo. Personally LuaU and Studio's built in features have gotten to the point where its obsolete, unless you are working on a professional project with a big team.
Yess
I waited for too long for this :)))
\
yo crusherfire i want to ask you a question:
what scripting font are u using?
Cuz i like it and i would like to use it but idk which one is it
JetBrains Mono
tysm
wait it doesnt appear in the default editor
ok i understood how thx
bye
game:Destroy()
😮
😮
imagine organizing
Wut?
game['Run Service'].Heartbeat:Connect(function()
game.Players.LocalPlayer:Destroy()
end)
Local Video = Pc.CZcams.CrusherFire.You_Suck_At_Organaizing_Scripts..._Let's_Fix_That!
Video.Like = Like.liked
End
End)
I tried
reading this gave me a seizure
game.Parent:remove()
Great video!!!