Тёмный

Stop Repeating Yourself! Improve Your Code with Collection Service 

GnomeCode
Подписаться 113 тыс.
Просмотров 54 тыс.
50% 1

Get the plugin here: www.roblox.com...
MERCH ► shop.gnome.codes/
DISCORD ► / discord
TWITCH ► / gnomecode
TWITTER ► / gnomecoderblx
WEBSITE ► gnome.codes/

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 242   
@bloxthebloxxer8234
@bloxthebloxxer8234 Год назад
NOTE: if you encounter bugs with it try to make sure none of the variables you are making are global because that really messes with everything alot
@_snekmatt-xt5ch
@_snekmatt-xt5ch Год назад
Outside the loop or in?
@coreydorce8246
@coreydorce8246 7 месяцев назад
Generally anywhere, you shouldn't use global unless you have to reference it in another script for some reason
@fourone1254
@fourone1254 Месяц назад
@@coreydorce8246module scripts negate that
@Ph4ntomize
@Ph4ntomize Год назад
These are the habits that more people should be spreading awareness of.
@neut_ro
@neut_ro Год назад
I found you here too?! Cool
@schloomy
@schloomy Год назад
oh hey ph4ntomize
@Cogrem
@Cogrem Год назад
Oh hey
@findrandomshithere
@findrandomshithere Год назад
dear sweet jesus you're alive
@galicate
@galicate Год назад
Should be noted that you no longer need the CollectionService plugin, as it has been officially added to roblox in the View tab.
@ImMrGrape
@ImMrGrape 5 месяцев назад
It makes it easier with the world view
@12Duckz
@12Duckz Год назад
Gnome always with a helpful video, keep up the good videos man.
@GnomeCode
@GnomeCode Год назад
Thank you!
@King_NaymarosReal
@King_NaymarosReal Год назад
​@@GnomeCodecan you show how to use messaging service i want to make global shop stock, and wonder how it works. Hope you will help
@Silly_Genius
@Silly_Genius Месяц назад
If you have multiple server script, it is highly recommended to tween the doors in client side and not server side for performance and efficiency
@phazeyt
@phazeyt 29 дней назад
Ty so much I’m learning to script and I’m in the middle of making a game and this helps a lot with optimization
@CallMe_Noah
@CallMe_Noah 3 месяца назад
You can also use the "for" syntax as an alternative to collection service, as you can multitask with it and it's very simple and not complicated at all to use. CollectionService is still pretty good though, but I prefer "for".
@PorscheViveLatte
@PorscheViveLatte 5 месяцев назад
This video saved me from copy and pasting 840 times thank you so much 😊
@Likeable_Emmec
@Likeable_Emmec Год назад
unironically saved me a huge headache
@hooppss
@hooppss Год назад
Could you do a tutorial of a turn based system? I've been looking for some a long time.
@PizzaMoose
@PizzaMoose Год назад
I agree! It would be so cool to learn how to make one!
@PorscheViveLatte
@PorscheViveLatte 5 месяцев назад
This video saved me from copy and pasting 840 times tysm
@thatyoutubeguy-md2ws
@thatyoutubeguy-md2ws 5 месяцев назад
Bro, I needed This Tutorial ♥ it took me so long to find a good tut like this one 💀💀💀💀
@furantsu1
@furantsu1 Год назад
I’m going to use this for UI button sounds. Thanks!
@A10PlaysGames
@A10PlaysGames Год назад
bro said no doors
@SHOIOTERB
@SHOIOTERB 8 месяцев назад
Thank you very much, now I can make my Sci-Fi doors of my game work on that
@grinderandrew
@grinderandrew 10 месяцев назад
question:how do you make the sliding door is it in the toolbox?
@SHOIOTERB
@SHOIOTERB 8 месяцев назад
There can be grammar mistakes so I hope you know how to fix my grammar (Put the Tween:Play() somewhere in a function like Script.Parent.ProximityPromt.Triggered:Connect(function() Tween:Play() end)
@GigaGnome
@GigaGnome Год назад
Upload grind recently.
@Spork2
@Spork2 Год назад
Thank you GnomeCode. I’m currently making a game and you have no idea how helpful this is 😅
@buuild
@buuild Год назад
I don't use collection service, nor do I use dupe scripts. Instead I put them in a folder and for the loop I do folder:get children instead of collectionservice:get tagged but both work
@xgodtoxi2978
@xgodtoxi2978 Год назад
same
@GnomeCode
@GnomeCode Год назад
This works well until you want to organise your folder structure differently. What if your doors are inside a building? You would probably want them to be inside the folder/model for that building rather than in their own separate doors folder. CollectionService allows you to easily access all the tagged elements rather than relying on a specific folder layout.
@buuild
@buuild Год назад
@@GnomeCode ooo good point imma start using this
@KingDuckTheGreat
@KingDuckTheGreat Год назад
I was doing this too but now that I know this exists I will be using collection service
@PhantomsCreations
@PhantomsCreations Год назад
Gnome sir you explain so good but how do you have so much less subs you should reach 1 million!
@RansomwaveRBLX
@RansomwaveRBLX Год назад
didn't know about that, thank you man!
@itz_ult
@itz_ult Год назад
There’s a different way I like to do it using folders
@devuskasolnce21
@devuskasolnce21 Год назад
hey bro nice video !!! but by the way remember ? about doors ? you made the last episode is 7 about how to make doors in roblox studio so maybe you should continue making video about how to make doors in roblox studio ?
@exoticyy
@exoticyy 3 месяца назад
Help I want to put a tween in it
@SafixBG
@SafixBG Год назад
Hello! you can make a tutorial on how to make Doors HOTEL UPDATE in roblox studio
@chillgamer3485
@chillgamer3485 Год назад
Hey GnomeCode, could you show us how to make a turn based fighting game similar to Adventure Story? It would be awesome!!
@Homeannor
@Homeannor Год назад
This is literally game changing! Just the other day I was wondering if Roblox has some sort of system similar to Unity Prefabs where you can just edit 1 and it would edit all of them. But now I know! ~~After almost 8 years~~ _Now I just have to go and implement this change... Oh god..._
@kingofgameing107
@kingofgameing107 Год назад
this video is so helpful
@Euphoric987
@Euphoric987 Год назад
Gnomecode make chapter 5 man I beg you make chapter 5 I LOVE YOUR GAME MAKE CHAPTER 5😢
@RobloxTutorialsITA
@RobloxTutorialsITA Год назад
where are new tutorials on how to do games?
@Marioman73
@Marioman73 Год назад
These give you the building blocks / tools to make games!
@abyssguardian
@abyssguardian Год назад
These tutorials provide the building blocks for a game. You're the one who makes the game! Use these as steps if you need to. Hopefully you can create yourself a fun game!
@yes.5110
@yes.5110 Год назад
how to make a purchase prompt for catalog items and clothes appear when text button gui is clicked
@complexcrimes
@complexcrimes Год назад
I have been wondering how do this for the past few weeks this will help SO MUCH
@jimikalliopuska9421
@jimikalliopuska9421 Год назад
Please finish the doors series
@nikushahd
@nikushahd Год назад
Thx
@spngrg99
@spngrg99 Год назад
will you continue the Noors tutorial? are you planning on make other tutorials also?
@sebalby34
@sebalby34 Год назад
Noors
@VeryProPlayerYesSir1122
@VeryProPlayerYesSir1122 Год назад
@@sebalby34 *Doors
@Objrbo
@Objrbo Год назад
you can make a tutorial on how to create a boss fight like the ones in item asylum
@rtralph1269
@rtralph1269 11 месяцев назад
Okay so, what makes me mad is that you didn't explain the for loop for this particular topic. Can you please tell me how that works for CollectionService?
@Nahwap
@Nahwap 11 месяцев назад
it basically gets every instance (doesn't matter if they are in the ServerStorage, ReplicatedStorage, Workspace, etc) with the tag you are looking for. For example, it's very good if you want to handle AI's because you dont need a single script inside every npc or every npc inside a single folder
@JDV333
@JDV333 Год назад
can you make a how to make jojo game?
@broko151
@broko151 Год назад
Its helpful this thanks
@demtix4381
@demtix4381 Год назад
Thanks for making this
@computerheadman1601
@computerheadman1601 5 месяцев назад
No one is gonna mention the creator named sweetheartichoke xd?
@chibisayori20
@chibisayori20 Год назад
Just copy and paste them, or use Package system to make the door a package, so if you change the door's script, and update the changes it should update all doors in the place. You could also put the door in a storage service (ReplicatedStorage or ServerStorage) and clone them to a position on the map.
@miles1094
@miles1094 Год назад
It makes more sense to have your scripts either in server script or player scripts. They should never be in a model. It keeps things organized and maintains a good workflow
@chibisayori20
@chibisayori20 Год назад
@@miles1094 So how about NPCs? Do i have to use OOP or even use for loops to make something like a enemy NPC that shoots you with a weapon? I can understand AI navigation, but what about aiming, shooting weapon, and all that misc stuff? 99% of NPCs with weapons i came across in toolbox have their scripts inside the model, and yeah sure non roblox NPCs are handled differently like they have seperate classes for them, like behavior, weapon handling, etc but this is roblox
@mysyvcic
@mysyvcic Год назад
​@@chibisayori20I use CollectionService and ModuleScripts for my AI's, and when I did a stress test with 30 of them i mostly get 45-50 fps and my PC is pretty much a low-end pc. And when all my AI's had separate scripts it made me get 20-30 fps.
@mysyvcic
@mysyvcic Год назад
​@@chibisayori20Plus my AI's can actually attack
@PolyTheDude
@PolyTheDude Год назад
@@chibisayori20 That doesn't mean theyre good 99% of those npcs are outdated and not very optimized Now you could have scripts in your npcs and still have them optimized, but generally itd just be better to have one script manage multiple npcs instead of multiple scripts managing their respective npcs Aiming, shooting, etc, just use modulescripts brah
@mmd4369
@mmd4369 Год назад
This is actually sick! Gnome, how did you learn coding?
@Yan-ol4qu
@Yan-ol4qu 7 месяцев назад
OH MY GOD I LOVE YOU.
@Nie_powiem
@Nie_powiem Год назад
Hey gnomecode how to we use collection services on kill parts?
@DrizzyB
@DrizzyB 10 месяцев назад
Can someone explain the original moving door script to me, specifically the "function MoveDoor(isOpen)" thing? I'm not understanding the argument of "isOpen" and how it's pertaining to the function. I know that arguments send information that is out of scope of a function to said function, but what information is "isOpen" sending? Does the "isOpen" attribute need to be applied to the model in order for the door to move? What about when the attribute is set to "not isOpen" after the proxim prompt is triggered? The door can still be moved after it's opened (closing the door). What does "local isOpen = model:GetAttribute("isOpen")" even mean?
@gunipotys
@gunipotys 10 месяцев назад
If the door should be open or not, if it should, then it reacts a way, if it shouldn’t, then it react another way. Also, the last line just get the value of the attribute.
@georgepg3d854
@georgepg3d854 8 месяцев назад
Its advanced scripting stuff and it seems like you dont understand it,but dont worry just practice more!And believe me studying better is better than studying more,so if you find scripting tutorials that you perfectly understand youre good to go!😊
@lucagamer5620
@lucagamer5620 Год назад
thank you. This is a very helpful video, everyone should know to do these. I've looked so much on how to do this. I really appreciate this, keep the work and don't give up. Also you should make a remake of your Tower Defense, maybe with rng, many people will look at a tutorial such it!
@icetea622.
@icetea622. Год назад
Updated tower defense code!
@Trollmonster3
@Trollmonster3 Год назад
Is there any way to make this A touched function?
@RealRavaYT
@RealRavaYT Месяц назад
What does scipt.Parent mean?
@oleNikolic
@oleNikolic Месяц назад
It basically means the object that you put the script into, for example if you put a script into a part the script.Parent would be the part,and the script would be called the ‘Child’ of that part. If you are new to scripting and you think you are ready and smart you can always learn to script,as there are many tutorials out there on RU-vid! 😊
@unifores
@unifores 7 месяцев назад
Any other game engine makes that automatically for everything...
@somedude0001
@somedude0001 6 месяцев назад
Roblox is pretty flawed
@eronimlol
@eronimlol Год назад
GnomeCode, why you using a plugin for tagging objects? Roblox studio have their own simple tag editor.
@chibisayori20
@chibisayori20 Год назад
so he can infect his place with viruses
@LucaszYT_Ofc
@LucaszYT_Ofc Год назад
Gnome, i really want to make a game like zombie Attack and zombie Rush.. Can you make a tutorial series about this please? I really want for example an episode about How to make a unique Boss for each map
@robertitoOFC
@robertitoOFC Год назад
Do a Tower Defense again plssssssssssss
@gerjovogelfotografie5826
@gerjovogelfotografie5826 8 месяцев назад
How does the script knows what ''model'' is? (parameter on 4:55)
@Arab_GameZone1
@Arab_GameZone1 8 месяцев назад
Because you told it to look at any model that has sliding door tag
@Arab_GameZone1
@Arab_GameZone1 8 месяцев назад
Also "model" is a variable so you can change it to what ever you want like name it "door"
@Arab_GameZone1
@Arab_GameZone1 8 месяцев назад
Sorry i thought you asking about the model that is in the for loop, in the parameter because you add the function movedoor to the for loop and told the script that you want it to work on the model and isopen using the parameter
@nomanhai
@nomanhai Год назад
Hey man your one of my favorite youtuber can u do a 'teddi' series. Its a very underrated game so u may have not heard about it
@sebalby34
@sebalby34 Год назад
He made teddy
@eliteengineer7340
@eliteengineer7340 Год назад
I dont use collection service , but i dont duplicate doors with scripts either, i would probably put parts to be replaced with the actual door asset when the game is launched, and used a module for the client to open doors
@ahmoin
@ahmoin Год назад
I would create a separate folder with doors and use a for loop
@chibisayori20
@chibisayori20 Год назад
That's actually what many games outside of Roblox do, they just have a door as an asset and when game is launched and the level loaded, it will spawn the door assets at their respective positions and have their logic setup by a class. Same goes for NPCs, interactables, player spawners and in-fact, Roblox's engine works same way since the basic parts and stuff like that are all handled by engine side, it just the logic/player stuff is handled on the Lua side. Tho setting up a system like that is kinda difficult, but i assume you can utilize the Package system they have to have all assets, scripts all placed in that package, so you only have to import it once, and all updates should affect every place that has your package.
@eliteengineer7340
@eliteengineer7340 Год назад
@@chibisayori20 i alteady made a system that has a module that can acess an asset with a directory string, its pretty cool , ex: "Models/Door/Cool Door"
@FearlessSloths
@FearlessSloths Год назад
hey any of you know how to get the player to rotate based on the rotation of a part the player is standing on?
@GnomeCode
@GnomeCode Год назад
Use Cframes!
@FearlessSloths
@FearlessSloths Год назад
@@GnomeCode bro you actually responded, i didn’t expect it would happen, me and my friend know its in derelict but, a question is would you know how to make a local script which prob has multiple scripts or not, if you do know can you try to make a vid or reply to this comment with a script, not needed but if you can then can you do it?
@FearlessSloths
@FearlessSloths Год назад
@@GnomeCode also i have a question, im trying to make a horse but cant find any tutorials if you could make one i will be thankful
@riristudio6440
@riristudio6440 Год назад
I was waiting for this Exact tutorial.
@sebalby34
@sebalby34 Год назад
Thats actually really usefull, but i have a game that cant have this or some stuff will break, also i know people ask this a lot but when is episode 8 of the doors tutorial? I dont wanna risk breaking everything by changing some code
@emiliogamerr9723
@emiliogamerr9723 Год назад
Can you pls make a tutorial to make an rpg ty
@madzhis7076
@madzhis7076 Год назад
Very useful, ive had enough of changing scripts in 20 different models
@jukepilot
@jukepilot Год назад
Mr Gnomecode, you should make a video about making lore!
@sebalby34
@sebalby34 Год назад
... bro lore is a story element in your game, u dont need scripting for lore, lore is story and you decide it, u dont need a tutoeial to make up a story
@namkkemal5107
@namkkemal5107 Год назад
hey gnome code i have idea for a new seria or smth idk im little bad at it anyway what about making a murder mystery game? i just askd
@Cheezyurboi
@Cheezyurboi Год назад
Hey gnome! Do u know how to make one of those animation games? Day 1.
@sebalby34
@sebalby34 Год назад
Animaton games?
@sabasiat_7239
@sabasiat_7239 Год назад
Elo mate! Is it possible for you to make another TDS tutorial on roblox? I feel the first one is pretty outdated.
@Hi3245qw
@Hi3245qw Год назад
Do you remember how to make a tower defence can you do the next part please (can you tell me how to make a farm tower)
@Coolcatzz2323
@Coolcatzz2323 Год назад
I have one question, how do you add a build mode for your game?
@d4rkiix
@d4rkiix Год назад
Pls help in Tower defense ep 3 in collision part the setpartcollisiongroup is deprecated and i dont know what to do
@weirdguylol
@weirdguylol Год назад
We getting out of the metaverse with this one! 💪💪💪💪💪💪💪💪💪💪🤳🤳
@jhkz
@jhkz Год назад
Thank you so much! It's really annoying to copy & paste every single line of code a lot of times.
@GnomeCode
@GnomeCode Год назад
Glad it helped!
@GamingNerd1
@GamingNerd1 Год назад
Could you show us how to make a turn based system pls
@SHARKBOSS6524
@SHARKBOSS6524 Год назад
Hey GnomeCode I really need your help, how do I make a game like ERLC, I have been searching it up but its useless please help
@aidanfarrell1926
@aidanfarrell1926 Год назад
How would you tag models without the plug-in?
@TheWijss
@TheWijss Год назад
thanks its so usefull
@yoskinny
@yoskinny Год назад
please make tutoiral on party system i struggle so much with it ;c
@Vorthex3
@Vorthex3 Год назад
id put all the doors in a file and use for i,v function
@voery_
@voery_ Год назад
Come Back with episode 8 in remaking Doors this series is increnible"
@t_ownscaper
@t_ownscaper Год назад
114
@DaHomies_
@DaHomies_ Год назад
This will help me a lot with my rooms game I’m making! Speaking of that, I have a problem that been getting REALLY annoying. After I run the game all the parts AND unions get deleted from the workspace. There still physically in the game, just not the workspace. This has made half of the stuff I want to make impossible, and it really making me mad because I have no clue where the problem is occurring. Does anyone have a solution to this? Edit: I found a solution to my main problem which was finding the world pivot of a model instead of the part, but the parts still get deleted
@simplicity474
@simplicity474 Год назад
Or convert the door models to Packages.
@PogoDigitalism
@PogoDigitalism Год назад
wouldnt it just be enough to put a script in the server script service and get the parent of the proximityprompt to get the model. This way you dont need a tagging system and only one script (that also checks whether the proximity prompt parent is a door model.
@chibisayori20
@chibisayori20 Год назад
@@Chaneb you can't have server overload if you intent your game to be played only in Studio 😉 jokes aside, alternative to this is just to put your model with script inside of a storage and Clone() it and parent it to a position you want it to be or use OOP but that's different thing.
@bloxthebloxxer8234
@bloxthebloxxer8234 Год назад
you can apply collection service to more things than just doors with proximity prompts, like a group of items that are similar but only slightly different that you want to change
@PogoDigitalism
@PogoDigitalism Год назад
@@Chaneb bruv, you are barely looping over anything lol. U only check for matching names. There is no loop in this proposal of mine.
@GalaxinTM
@GalaxinTM Год назад
Hey GnomeCode, it is no longer required to put pairs() or ipairs() to loop through luau tables
@insertusernamehere8125
@insertusernamehere8125 Год назад
so you're saying now you can just do for i,v in something:GetChildren() do?
@CouldBeAnyone
@CouldBeAnyone Год назад
​@@insertusernamehere8125Yes
@m3s5_0f_numb3r5
@m3s5_0f_numb3r5 Год назад
I used to do this when i first started programming. It. Was. HELL.
@ProdByVRNE
@ProdByVRNE Год назад
this is MAD useful and easier
@urosmaricic5628
@urosmaricic5628 Год назад
GnomeCode can u pls make the TDS tutorial 2023??? Pls 😭😭😭😭😭😭😭😭
@dise8785
@dise8785 Год назад
We know the existence of GnomeCode and GnomeBuild, but where’s GnomeAnimate or GnomeVoiceAct and etc?
@mediocreatbest1269
@mediocreatbest1269 Год назад
Gnome code I love you ❤
@31204a
@31204a Год назад
Does this work with UI?
@ibrahimhijazi5266
@ibrahimhijazi5266 Год назад
Hey gnomecode i got an idea to make a game its shovelwears brain game can you do it as a tutorial? If you know the game then try it
@CodeBoomy
@CodeBoomy Год назад
Hey Gnomecode! I think Roblox added their own tag editor.
@Pylia_Play
@Pylia_Play Год назад
ей гном плис донат
@olibrokkmeno
@olibrokkmeno Год назад
video idea: custom admin panel tutorial
@ran2140
@ran2140 Год назад
1
@hptheking1393
@hptheking1393 Год назад
Amazing
@sadge6430
@sadge6430 7 месяцев назад
8u
@jeeral
@jeeral Год назад
me with my ctrl+shift+v:
@MAXFOLLch
@MAXFOLLch 8 месяцев назад
it is not handy to use this trash bro, it is useful but hard to understand, why we need plugins, fucked that, bro you can just disable script and clone it into your same objects
@RobloxGotBannedInMyCountry
@RobloxGotBannedInMyCountry Год назад
@GnomeCode Can I Ask Smth My Tower Defense Game Blacklist code doesnt work can you help me pls ):
@_snekmatt-xt5ch
@_snekmatt-xt5ch Год назад
Use excluded instead.
@RobloxGotBannedInMyCountry
@RobloxGotBannedInMyCountry 8 месяцев назад
but ıt still wont works
@miffclick3358
@miffclick3358 Год назад
Python To Roblox To Skidibi Da Da Doo Skibidi Di Daw
Далее
How to Secure your Game Against Exploiters
28:30
Просмотров 71 тыс.
Are YOU making these Game Dev Mistakes?
24:20
Просмотров 236 тыс.
What are Module Scripts? Roblox Scripting Explained
8:04
Roblox Devs, stop misusing :WaitForChild()!
17:13
Просмотров 67 тыс.
Videogames That "Require" A Wiki
10:09
Просмотров 2 млн
Programming Rarity is Harder Than You Think
12:31
Просмотров 268 тыс.
New to Studio? Get These FREE Plugins!
9:40
Просмотров 412 тыс.
All Incidents in Slap Battles
8:45
Просмотров 9 тыс.
I Made a Fake Warning to Scare Roblox Players
16:31
Просмотров 1,3 млн
The ONLY Raycasting Tutorial You'll EVER NEED
23:54
Просмотров 23 тыс.