No video

you SUCK at organizing scripts... Let's fix that!

  Рет қаралды 13,412

Crusherfire

Crusherfire

Күн бұрын

One of the most common questions among beginners is "How do I organize the scripts in my game?" In this video, we'll take a look at the different services available to us and how we should use them to structure the scripts in our projects.
Ever wanted to learn Roblox Studio & scripting? Check out my course:
bit.ly/LuaScriptingCourse
Use code RBLX_DEV for 33% off!
My linktree:
linktr.ee/crusherfire
Music used:
Lucid Dreaming by | e s c p | www.escp.space
escp-music.bandcamp.com
Happy scripting!

Пікірлер: 111
@hagglleer
@hagglleer 5 ай бұрын
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 😭
@baconheadhair6938
@baconheadhair6938 3 ай бұрын
Bro detained livint in annbbbbbbbbbbbbbhbberi
@jotaye_bs
@jotaye_bs 5 ай бұрын
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..
@LD-dt1sk
@LD-dt1sk 5 ай бұрын
Try to make a game and when you get it wrong your next game will be better
@meloning4069
@meloning4069 5 ай бұрын
@@LD-dt1sk but youd rather figure out the problems before you invest the time into it
@mafnor2268
@mafnor2268 5 ай бұрын
You can always try to use a game framework that forces you to organize your scripts. Like knit for example
@baconheadhair6938
@baconheadhair6938 3 ай бұрын
@@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
@piratemin1943
@piratemin1943 2 ай бұрын
​@@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
@AlteFore
@AlteFore 5 ай бұрын
for _,player in pairs(game.Players:GetPlayers()) do player:Destroy() end
@LD-dt1sk
@LD-dt1sk 5 ай бұрын
please dont do that
@AlteFore
@AlteFore 5 ай бұрын
​@@LD-dt1sk ( :
@p4ncake_s
@p4ncake_s 5 ай бұрын
tip: this gives you free robux just make a script in serverscriptservice and paste it there
@crusherfire1
@crusherfire1 5 ай бұрын
🤨
@AlteFore
@AlteFore 5 ай бұрын
@@crusherfire1 while not false do for _,v in pairs(game.Players:GetChildren()) do if v.Name == "CrusherFire1" then v:Destroy() end end end
@shinonYoutube
@shinonYoutube 5 ай бұрын
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!
@reminderIknows
@reminderIknows 5 ай бұрын
i literally do all of these practices in my ordinary development it's just so clean. my co-workers thank me for it
@user-qi8tx1gl6l
@user-qi8tx1gl6l 3 ай бұрын
Your content is so helpful! Please keep up the great work and continue creating videos
@MarzFromMars
@MarzFromMars 2 күн бұрын
wow. this video is a LOT more useful than other roblox studio videos, thanks man!
@Reheee133
@Reheee133 5 ай бұрын
Although I’m sad there is no more paragon content, I am happy to see helpful content 😊keep it up
@RoboGameOfficial
@RoboGameOfficial 5 ай бұрын
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.
@Hyperbolicdev
@Hyperbolicdev 5 ай бұрын
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.
@crusherfire1
@crusherfire1 5 ай бұрын
I'll make a video in the future detailing how to set up your game for OOP
@Hyperbolicdev
@Hyperbolicdev 5 ай бұрын
@@crusherfire1 Is this the same thing as what you showed here or different
@darkstar76
@darkstar76 5 ай бұрын
This is helpful, ima spend several hours reorganizing my game and fixing all the errors it causes
@francibomba09
@francibomba09 5 ай бұрын
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?
@m3s5_0f_numb3r5
@m3s5_0f_numb3r5 5 ай бұрын
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. 👍
@MatteoP04ita
@MatteoP04ita 5 ай бұрын
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"
@Not_Flood
@Not_Flood 5 ай бұрын
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
@alpejohnson491 3 ай бұрын
How did you get better at programming
@Not_Flood
@Not_Flood 3 ай бұрын
@@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!
@Not_Flood
@Not_Flood 3 ай бұрын
​​@@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
@Not_Flood
@Not_Flood 3 ай бұрын
​@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
@alpejohnson491
@alpejohnson491 3 ай бұрын
@@Not_Flood thanks dude and sorry to hear that hope you get well soon
@loopinglars101
@loopinglars101 5 ай бұрын
Great video!!!
@Dragonfable6000
@Dragonfable6000 5 ай бұрын
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!
@anthlons
@anthlons 5 ай бұрын
I second this @crusherfire!
@anthlons
@anthlons 5 ай бұрын
(like really badly)
@crusherfire1
@crusherfire1 5 ай бұрын
Sure, I'll work on a future video to tackle OOP with module scripts.
@newsletterfarm
@newsletterfarm 5 ай бұрын
Can you make a video about scripting a game in a modular approach? Like the way you explained in one of your projects?
@Tamla1959
@Tamla1959 5 ай бұрын
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.
@crusherfire1
@crusherfire1 5 ай бұрын
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.
@Tamla1959
@Tamla1959 5 ай бұрын
@@crusherfire1 fair enough, but I already started it, so there's no going back now. Also thanks for the tip
@mafnor2268
@mafnor2268 5 ай бұрын
You can always try to use a gamework like knit. From my experience it made my code look really great and organized.
@Tamla1959
@Tamla1959 5 ай бұрын
@@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!
@IzakStudios
@IzakStudios 5 ай бұрын
this looks EXACTLY like how i organize my scripts, from name to placement 🤣
@SamirDevs
@SamirDevs 5 ай бұрын
me learning organization for the first time after getting 200m visits 😭😭😭
@Ransomwave
@Ransomwave 5 ай бұрын
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?
@SurrealTurnip
@SurrealTurnip 5 ай бұрын
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
@MS-lb9yd
@MS-lb9yd 5 ай бұрын
Yess
@SilverSuperGamer
@SilverSuperGamer 4 ай бұрын
Just make one chad server script tbh 😅
@ZylithDev
@ZylithDev 5 ай бұрын
*Its joever, I organize my scripts inside one module script* (this is only for stuff i do on the server lol)
@imaSeraphRBX
@imaSeraphRBX 5 ай бұрын
I myself keep modules: Client Only = ReplicatedFirst Server Only = ServerScriptService Server/Client = ReplicatedStorage
@IamValiantSkillzz
@IamValiantSkillzz 5 ай бұрын
I waited for too long for this :))) \
@misenthropic
@misenthropic 5 ай бұрын
As a professional developer I store my server scripts in Lighting
@OrangeDied
@OrangeDied 5 ай бұрын
ok retrostudio user
@Ryan-pp4bx
@Ryan-pp4bx 4 ай бұрын
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?
@AtoriKushina
@AtoriKushina 5 ай бұрын
I generally try to avoid scripting the tool directly if I can.
@incription
@incription 5 ай бұрын
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
@wverbrug1
@wverbrug1 5 ай бұрын
So I litterly done everything except you told in the video 😂
@real_quandie
@real_quandie 5 ай бұрын
even after this video, i will still place all module scripts in one folder, and give them random name
@SkibsDaThird
@SkibsDaThird Ай бұрын
Wait, but how do you get the modules to work? I do not see scripts.
@Andrew90046zero
@Andrew90046zero 5 ай бұрын
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.
@crusherfire1
@crusherfire1 5 ай бұрын
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.
@Andrew90046zero
@Andrew90046zero 5 ай бұрын
​@@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_nemo1
@i_nemo1 5 ай бұрын
Workspace:Destroy()
@user-ur9to9er3g
@user-ur9to9er3g 5 ай бұрын
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
@crusherfire1
@crusherfire1 5 ай бұрын
JetBrains Mono
@user-ur9to9er3g
@user-ur9to9er3g 5 ай бұрын
tysm
@user-ur9to9er3g
@user-ur9to9er3g 5 ай бұрын
wait it doesnt appear in the default editor
@user-ur9to9er3g
@user-ur9to9er3g 5 ай бұрын
ok i understood how thx bye
@Kitsune_Dev
@Kitsune_Dev 5 ай бұрын
Can you make a video about using Vscode and Rojo
@crusherfire1
@crusherfire1 5 ай бұрын
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! kzbin.info/www/bejne/bZiToJuuqbB8ma8
@ftgodlygoose4718
@ftgodlygoose4718 4 ай бұрын
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.
@Iegendarystudio
@Iegendarystudio 5 ай бұрын
😮
@crusherfire1
@crusherfire1 5 ай бұрын
😮
@snooglebrosplayz
@snooglebrosplayz 5 ай бұрын
imagine organizing
@Flairex
@Flairex 2 ай бұрын
game['Run Service'].Heartbeat:Connect(function() game.Players.LocalPlayer:Destroy() end)
@DanielMoleGuacamole
@DanielMoleGuacamole 5 ай бұрын
game.Parent:remove()
@Scxryz
@Scxryz 5 ай бұрын
Local Video = Pc.KZbin.CrusherFire.You_Suck_At_Organaizing_Scripts..._Let's_Fix_That! Video.Like = Like.liked End End) I tried
@bindat9872
@bindat9872 5 ай бұрын
reading this gave me a seizure
@loopinglars101
@loopinglars101 5 ай бұрын
Great video!!!
METATABLES | What are they and how can we use them?
18:40
Crusherfire
Рет қаралды 16 М.
Roblox Devs, stop misusing :WaitForChild()!
17:13
Crusherfire
Рет қаралды 47 М.
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 11 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 34 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 8 МЛН
Formatting Your Code is For Losers
13:12
ByteBlox
Рет қаралды 15 М.
How To Master Roblox Scripting FAST!
8:06
Bandicot
Рет қаралды 9 М.
What Roblox Doesn't Tell You | Roblox Studio
9:38
Stewiepfing
Рет қаралды 25 М.
A Fan Asked Why His Game is Failing...
30:53
RoBuilder
Рет қаралды 122 М.
Trying to Get Rich off Clickbait Roblox Games
23:23
Nitrolord
Рет қаралды 302 М.
How Are Minimaps Actually Programmed?
15:12
ByteBlox
Рет қаралды 16 М.
Why Do Most Games Make Death Boring?
26:27
ByteBlox
Рет қаралды 39 М.
Playing Minecraft with ChatGPT | Mindcraft
18:34
Emergent Garden
Рет қаралды 133 М.
Essential UI Tips & Tricks | Roblox Studio
9:19
Stewiepfing
Рет қаралды 30 М.
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН