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

  Рет қаралды 21,563

Crusherfire

Crusherfire

Күн бұрын

Пікірлер: 135
@hagglleer
@hagglleer 9 ай бұрын
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 6 ай бұрын
Bro detained livint in annbbbbbbbbbbbbbhbberi
@AlteFore
@AlteFore 9 ай бұрын
for _,player in pairs(game.Players:GetPlayers()) do player:Destroy() end
@LD-dt1sk
@LD-dt1sk 9 ай бұрын
please dont do that
@AlteFore
@AlteFore 9 ай бұрын
​@@LD-dt1sk ( :
@p4ncake_s
@p4ncake_s 9 ай бұрын
tip: this gives you free robux just make a script in serverscriptservice and paste it there
@crusherfire1
@crusherfire1 9 ай бұрын
🤨
@AlteFore
@AlteFore 9 ай бұрын
@@crusherfire1 while not false do for _,v in pairs(game.Players:GetChildren()) do if v.Name == "CrusherFire1" then v:Destroy() end end end
@jotaye_bs
@jotaye_bs 9 ай бұрын
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 9 ай бұрын
Try to make a game and when you get it wrong your next game will be better
@meloning4069
@meloning4069 9 ай бұрын
@@LD-dt1sk but youd rather figure out the problems before you invest the time into it
@mafnor2268
@mafnor2268 9 ай бұрын
You can always try to use a game framework that forces you to organize your scripts. Like knit for example
@baconheadhair6938
@baconheadhair6938 6 ай бұрын
@@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 6 ай бұрын
​@@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
@reminderIknows
@reminderIknows 9 ай бұрын
i literally do all of these practices in my ordinary development it's just so clean. my co-workers thank me for it
@misenthropic
@misenthropic 9 ай бұрын
As a professional developer I store my server scripts in Lighting
@OrangeDied
@OrangeDied 8 ай бұрын
ok retrostudio user
@MediumRare_1
@MediumRare_1 Ай бұрын
I see a lot of Roblox studio tutorial but you are the only one that I have seen go more in-depth with it and I love it!
@headlass
@headlass Ай бұрын
take me back to the time i stored my scripts in replicated storage and expected them to work 💔
@RoboGameOfficial
@RoboGameOfficial 9 ай бұрын
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.
@SamirDevs
@SamirDevs 9 ай бұрын
me learning organization for the first time after getting 200m visits 😭😭😭
@ThicK_Mango
@ThicK_Mango 12 күн бұрын
Thanks
@shinonYoutube
@shinonYoutube 9 ай бұрын
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!
@Hyperbolicdev
@Hyperbolicdev 9 ай бұрын
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 9 ай бұрын
I'll make a video in the future detailing how to set up your game for OOP
@Hyperbolicdev
@Hyperbolicdev 9 ай бұрын
@@crusherfire1 Is this the same thing as what you showed here or different
@Dragonfable6000
@Dragonfable6000 9 ай бұрын
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 9 ай бұрын
I second this @crusherfire!
@anthlons
@anthlons 9 ай бұрын
(like really badly)
@crusherfire1
@crusherfire1 9 ай бұрын
Sure, I'll work on a future video to tackle OOP with module scripts.
@roliuu
@roliuu Ай бұрын
As a C++ dev, im glad I found a proper guide on where I should put scripts, I was doing modular approach, but slightly scuffed
@darkstar76
@darkstar76 9 ай бұрын
This is helpful, ima spend several hours reorganizing my game and fixing all the errors it causes
@MatteoP04ita
@MatteoP04ita 9 ай бұрын
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"
@ngw4
@ngw4 2 ай бұрын
this is an okay approach, but things will often get a bit clunky, ESPECIALLY if you're trying to make changes to something that's been duplicated a bunch. consider using tags for those, or even ObjectValues for single instances that can be moved around.
@MarzFromMars
@MarzFromMars 3 ай бұрын
wow. this video is a LOT more useful than other roblox studio videos, thanks man!
@Not_Flood
@Not_Flood 9 ай бұрын
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 6 ай бұрын
How did you get better at programming
@Not_Flood
@Not_Flood 6 ай бұрын
@@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 6 ай бұрын
​​@@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 6 ай бұрын
​@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 6 ай бұрын
@@Not_Flood thanks dude and sorry to hear that hope you get well soon
@francibomba09
@francibomba09 9 ай бұрын
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?
@SilverSuperGamer
@SilverSuperGamer 8 ай бұрын
Just make one chad server script tbh 😅
@Pathos-Broadcasting
@Pathos-Broadcasting 9 ай бұрын
Although I’m sad there is no more paragon content, I am happy to see helpful content 😊keep it up
@m3s5_0f_numb3r5
@m3s5_0f_numb3r5 9 ай бұрын
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. 👍
@IzakStudios
@IzakStudios 9 ай бұрын
this looks EXACTLY like how i organize my scripts, from name to placement 🤣
@Noon1263
@Noon1263 9 ай бұрын
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 9 ай бұрын
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.
@Noon1263
@Noon1263 9 ай бұрын
@@crusherfire1 fair enough, but I already started it, so there's no going back now. Also thanks for the tip
@mafnor2268
@mafnor2268 9 ай бұрын
You can always try to use a gamework like knit. From my experience it made my code look really great and organized.
@Noon1263
@Noon1263 9 ай бұрын
@@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!
@Lilacmymy7
@Lilacmymy7 9 күн бұрын
You can make a city while scripting
@imaSeraphRBX
@imaSeraphRBX 9 ай бұрын
I myself keep modules: Client Only = ReplicatedFirst Server Only = ServerScriptService Server/Client = ReplicatedStorage
@newsletterfarm
@newsletterfarm 9 ай бұрын
Can you make a video about scripting a game in a modular approach? Like the way you explained in one of your projects?
@HayvenMiller-b5i
@HayvenMiller-b5i 7 ай бұрын
Your content is so helpful! Please keep up the great work and continue creating videos
@real_quandie
@real_quandie 9 ай бұрын
even after this video, i will still place all module scripts in one folder, and give them random name
@ZylithDev
@ZylithDev 9 ай бұрын
*Its joever, I organize my scripts inside one module script* (this is only for stuff i do on the server lol)
@i_nemo1
@i_nemo1 9 ай бұрын
Workspace:Destroy()
@AtoriKushina
@AtoriKushina 9 ай бұрын
I generally try to avoid scripting the tool directly if I can.
@JustNoobGuy
@JustNoobGuy 3 ай бұрын
**suddenly realises** I ALWAYS MADE A FRAMEWORK WITHOUT KNOWING???
@Andrew90046zero
@Andrew90046zero 9 ай бұрын
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 9 ай бұрын
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 9 ай бұрын
​@@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.
@robinagata
@robinagata 2 ай бұрын
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
@Ryan-pp4bx
@Ryan-pp4bx 8 ай бұрын
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?
@loopinglars101
@loopinglars101 9 ай бұрын
Great video!!!
@Ransomwave
@Ransomwave 9 ай бұрын
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?
@MS-lb9yd
@MS-lb9yd 9 ай бұрын
Yess
@PiperDoss
@PiperDoss 18 күн бұрын
What if your using a single server script for all those dozens of module scripts and one of them bugs out and throws that one single serverscript off and crashes every other module script? Harder to debug too. Break that set up into more modular systems rather then a single system.
@crusherfire1
@crusherfire1 17 күн бұрын
I have a module loader that serially goes through and requires, initializes, and then starts modules in my game. It's all done through pcalls, so if an error happens in a particular module at a certain stage (requiring, initializing, etc), it'll catch the error and warn in the output that a particular module failed to load, initialize, start, etc. The nice thing about a single script setup with a module loader is that you can guarantee that a script has been required or initialized, etc., before doing other things. For example, the initialization stage of my modules sets up any runtime instances and connects handlers to events. Therefore in the start stage of my modules, it's a guarantee that all modules in the game have already been initialized!
@PiperDoss
@PiperDoss 16 күн бұрын
@@crusherfire1 Sounds good. Good info for sure. Thank you!
@wverbrug1
@wverbrug1 9 ай бұрын
So I litterly done everything except you told in the video 😂
@SkibsDaThird
@SkibsDaThird 5 ай бұрын
Wait, but how do you get the modules to work? I do not see scripts.
@Radi1005.
@Radi1005. 3 ай бұрын
game:Destroy()
@Kitsune_Dev
@Kitsune_Dev 9 ай бұрын
Can you make a video about using Vscode and Rojo
@crusherfire1
@crusherfire1 9 ай бұрын
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 8 ай бұрын
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.
@incription
@incription 9 ай бұрын
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
@Iegendarystudio
@Iegendarystudio 9 ай бұрын
😮
@crusherfire1
@crusherfire1 9 ай бұрын
😮
@SurrealTurnip
@SurrealTurnip 9 ай бұрын
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
@snooglebrosplayz
@snooglebrosplayz 9 ай бұрын
imagine organizing
@BruhEhEh-m5n
@BruhEhEh-m5n 9 ай бұрын
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 9 ай бұрын
JetBrains Mono
@BruhEhEh-m5n
@BruhEhEh-m5n 9 ай бұрын
tysm
@BruhEhEh-m5n
@BruhEhEh-m5n 9 ай бұрын
wait it doesnt appear in the default editor
@BruhEhEh-m5n
@BruhEhEh-m5n 9 ай бұрын
ok i understood how thx bye
@IamValiantSkillzz
@IamValiantSkillzz 9 ай бұрын
I waited for too long for this :))) \
@JustADudeDoingSomething
@JustADudeDoingSomething 3 ай бұрын
Wut?
@Flairex
@Flairex 5 ай бұрын
game['Run Service'].Heartbeat:Connect(function() game.Players.LocalPlayer:Destroy() end)
@DanielMoleGuacamole
@DanielMoleGuacamole 9 ай бұрын
game.Parent:remove()
@Scxryz
@Scxryz 9 ай бұрын
Local Video = Pc.KZbin.CrusherFire.You_Suck_At_Organaizing_Scripts..._Let's_Fix_That! Video.Like = Like.liked End End) I tried
@bindat9872
@bindat9872 9 ай бұрын
reading this gave me a seizure
@loopinglars101
@loopinglars101 9 ай бұрын
Great video!!!
AI for Roblox is GOOFY...
19:30
Crusherfire
Рет қаралды 3,9 М.
Roblox Devs, stop misusing :WaitForChild()!
17:13
Crusherfire
Рет қаралды 73 М.
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 83 МЛН
Easily create Roblox games this way!
11:34
MonzterDEV
Рет қаралды 16 М.
Object-Oriented Programming in Roblox Studio!
23:12
Crusherfire
Рет қаралды 11 М.
Classic Roblox RPG | Devlog #5 - BIG UPDATE!
7:18
galaxhex
Рет қаралды 12 М.
How Unoptimized Can a Roblox Game Get?
16:49
ByteBlox
Рет қаралды 321 М.
Investigation: How Roblox Is Exploiting Young Game Developers
22:44
People Make Games
Рет қаралды 2,4 МЛН
The ONLY Raycasting Tutorial You'll EVER NEED
23:54
script_ing
Рет қаралды 27 М.
Can 2 DEVS Make A SURVIVAL Game in 24 Hours? (Roblox)
12:03
Composition Over Inheritance - OOP in Roblox Studio
17:31
B Ricey
Рет қаралды 22 М.
Roblox WEAK tables & how to use them
23:30
Crusherfire
Рет қаралды 7 М.
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24