i feel so dumb knowing that the hours i spent copying and pasting scripts was a huge waste of time. This is going to make everything easier thank you so much!
@danoobking9012 ай бұрын
You'd be surprised how much this helped with something entirely unrelated. kinda unrelated I wanted to make it so when you click a button, it did something, but there were a ton of buttons. I first tried a for loop, but apparently when you click it runs as many times as there are buttons, which is really buggy. I didn't want to manually type a bunch of code for each button, so this helped a lot, thanks!
@SurfsUpSeth Жыл бұрын
Lol I didn't even know collectionservice was a thing. I just created object classes and pretty much built my collection service. This makes it so much easier.
@ugurcan9208 Жыл бұрын
can u show me something about ur class
@ooo8188 Жыл бұрын
how did you create your classes?
@MrChaoticCrazed8 ай бұрын
@@ooo8188Object Oriented Programming with Modules
@jonnyramos503 жыл бұрын
Keep grinding bro your content is very much appreciated
@Reptle_3 жыл бұрын
Best Roblox Studio youtuber on the platform
@stefotheguy27663 жыл бұрын
I had this Problem where I needed to copy and paste the same script into a ton of tools just to make it so you cant walk over em and pick them up and now I just tag a tool and Boom! It`s Great
@X_Infinity83 жыл бұрын
You could also turn off “CanTouch” under the properties tab of the tool or it’s handle
@stefotheguy27663 жыл бұрын
@@X_Infinity8 but that will make it that nothing can touch it
@X_Infinity83 жыл бұрын
@@stefotheguy2766 That’s CanCollide not CanTouch, CanTouch makes it so it can’t be picked up
@stefotheguy27663 жыл бұрын
@@X_Infinity8 OH thats smart I thougth it was two way system it cant touch and it cant be touched I'll be doing that for my game then thanks :D
@FghHhj-vb5ff Жыл бұрын
I think ur one of the best scripters out there!
@BRicey Жыл бұрын
Thank you!
@CookieSnackRhythm3 жыл бұрын
i wasn't ready for "So lets say you are building a landmine" 🤣
@BRicey3 жыл бұрын
Hey it probably made you interested, and that was the whole point. I find learning scripting with an example instead of abstract concepts is a lot easier.
@CookieSnackRhythm3 жыл бұрын
@@BRicey how did you learn to script?
@BigFloppaEnthusiast8 ай бұрын
I don't comment often but this was really helpful with collectathon systems, I wish learned about tags sooner
@nathanerickson74649 ай бұрын
Man, you need to keep this up, you saved my life today with this vid!
@igz55533 жыл бұрын
high quality video 👍 needed this for knit
@BRicey3 жыл бұрын
Ya that knit game tutorial was super helpful, glad you could use my video to help you out!
@adum21983 жыл бұрын
Honestly, why do you have so little views and subs when you explain it so well?
@BRicey3 жыл бұрын
Because there are so little people thst want to learn in depth. The cool thing is, as time goes on, more people will get curious and join.
@adum21983 жыл бұрын
@@BRicey Hopefully.
@rashy153 жыл бұрын
@@BRicey this is true my dog actually joined in.
@libriumdev3 жыл бұрын
@@BRicey yeah, the “scripters” who watch TheDevKing only learn this to get rich off of a simulator. Chads like us learn to become extremely well rounded programmers.
@karlmarx27043 жыл бұрын
You had me at landmine
@3tutorialdelmietitor3483 жыл бұрын
brother, from the videos I see you have a lot of experience with roblox studio, if I may ask how long have you been using roblox studio? however you are great! and never give up with roblox studio
@susmanrules3 жыл бұрын
by that i mean you can select multiple units by holding left click selction and then once they are selected they will pathfind to the cursors location
@templed20213 жыл бұрын
very specific...
@snowfall_edits3 жыл бұрын
commiting war crimes with the bois (great tutorial dude)
@EAGamers102 жыл бұрын
For some reason, on line 3 for "Script", the line "local connections {}" gives me an error (red squiggly line) underneath the first curly bracket and I'm just confused why? Even the use of the word "connections" on line 18 also gives me an error too. Code: local CollectionService = game:GetService("CollectionService") local connections {} local function makeLandmine(part) local connection = part.Touched:Connect(function(hit) local character = hit:FindFirstAncestorWhichIsA("Model") if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then local explosion = Instance.new("Explosion") explosion.Position = part.Position explosion.Parent = workspace part:Destroy() end end end) connections[part] = connection end for _, landmine in pairs(CollectionService:GetTagged("Landmine")) do makeLandmine(landmine) end CollectionService:GetInstanceAddedSignal("Landmine"):Connect(function(instance) makeLandmine(instance) end) CollectionService:GetInstanceRemovedSignal("Landmine"):Connect(function(instance) if connections[instance] then connections[instance]:Disconnect() end end)
@chris_beingstupid Жыл бұрын
because it needs to be "local connections = {}"
@MeatMake Жыл бұрын
spitting actual facts though @@chris_beingstupid
@baseplate_4623 жыл бұрын
Wow. My method would be to have a single script in all like objects that would just clone The script they were going to use from server storage then delete the script that setup the clone. This way when i wanted to update all those models, i just change one code.
@BRicey3 жыл бұрын
That's one way of doing it. It's not wrong, but I feel like collection service would be easier.
@zhanfl86703 жыл бұрын
this is very useful, im subbing man
@MegaSpaghett3 жыл бұрын
Smart, I just put what in a folder and run a loop getting folder children. Although tagging is better
@BRicey3 жыл бұрын
I mean that works too
@hungryhungryhummer3 жыл бұрын
Love you dad
@BRicey3 жыл бұрын
U too son
@FINDROBLOX7 ай бұрын
I love after the years of development and watching tutorials everyone says dot like game.players everyone says dot
@Saykator3 ай бұрын
Thank you, it was clear
@MinhNgo-wj1xq5 ай бұрын
I tried this but the problem was like one of the parts were transported from the replicatedStorage into the workspace but still, it does not work.
@siddhapandeypanigrahi3533 жыл бұрын
Before watching this I used to put 1 part in server storage with the kill script n then copy it into the workspace during runtime but tagging is better lol 😂
@susmanrules3 жыл бұрын
so ive been watching stuff and i cant find what i need can you do a tutorial how to make warcraft 3 type units and selection
@_quite.essentiallyjay2 жыл бұрын
I was wondering why my game's servers were so slow
@stephen50705 ай бұрын
Whenever I Tag an instance inside the player GUI, for whatever reason it doubles the index length of the returned #Array. Can anybody explain why this is happening to me? I tried using differently named Tags and I get the same results.
@templed20213 жыл бұрын
Could you make a tutorial on how to do dropdown menus i rlly need it thx
@Zwifs2 жыл бұрын
Very good explained but sometimes hard for me due to my industry knowledge. Table? Huh? Your making a connection dictionary. But very good explanations, I can get in to scripting fast now.
@BRicey2 жыл бұрын
Yea Luau is kinda whacky when it comes to industry standards... it even uses 1-indexing instead of 0
@damirandos2 жыл бұрын
How to make "SoldierFriend" team tag?
@priyotrilaksono5722 Жыл бұрын
on line 18 connection has a blue line local CollectionService = game:GetService("CollectionService") local connections = {} local function makeLandmine(part) part.Touched:Connect(function(hit) local character = hit:FindFirstAncestorWhichIsA("Model") if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then local explosion = Instance.new("Explosion") explosion.Position = part.Position explosion.Parent = workspace part:Destroy() end end end) connections[part] = connection -- here end for _, landmine in pairs(CollectionService:GetTagged("Landmine")) do makeLandmine(landmine) end CollectionService:GetInstanceAddedSignal("Landmine"):Connect(function(instance) makeLandmine(instance) end) CollectionService:GetInstanceRemovedSignal("Landmine"):Connect(function(instance) if connections[Instance] then connections[Instance]:Disconnect() end end)
@priyotrilaksono5722 Жыл бұрын
and this too
@priyotrilaksono5722 Жыл бұрын
local CollectionService = game:GetService("CollectionService") local test = workspace.Test --here wait(5) CollectionService:AddTag(test, "Landmine") wait(5) CollectionService:RemoveTag(test, "Landmine")
@priyotrilaksono5722 Жыл бұрын
I cant test the game
@_quite.essentiallyjay2 жыл бұрын
I understand how to go about this with functions and script connections, but what about while loops? How would I implement collection service on while loops
@_quite.essentiallyjay2 жыл бұрын
nevermind coroutines
@nickmick83063 жыл бұрын
is there a possible way to use this detection with custom characters? Ive got tagged models that the player becomes which they stay tagged but when a player touches the tagged player, it doesn't seem to detect it
@BRicey3 жыл бұрын
Maybe the touch is the problem, not the tags.
@aridam35632 жыл бұрын
Idk if my computer's just broken or smth but it doesn't let me tag the part, when i use the tag thingy this box comes up next to the words and doesn't let me properly do it it'd be real helpful if you could explain what's wrong cause I just wanna make a good game n publish it:(
@BRicey2 жыл бұрын
I think since the video has been released, the tag editor was updated, and now you have to click that box, its a check box, when its checked it means a part is tagged.
@mice96442 жыл бұрын
Or just use Modules
@pynx88612 жыл бұрын
How would you add a local variable which is different for every mine ? I tried using this to add a lot fading platforms that disapear for 10 seconds when I touch them, but I wasn't able to use a local boolean to say if it is already touched. I had to use and Attribute on each platform and update it in the function
@autisticbluesloth5244 Жыл бұрын
use set attribute
@doodledud918911 ай бұрын
Damn I was just making a folder and using for I,v in pairs()
@libriumdev3 жыл бұрын
Couldn’t you use tables to accomplish this? What makes this a better method?
@ritsu98373 жыл бұрын
Yes I think using tables woul be easier but I would like to know what makes it a better method
@BRicey3 жыл бұрын
You are using tables, collection service gives u a table of all of the things tagged.
@Pratixx3 жыл бұрын
tagging isnt required. you can just loop through the entire game and add whatever you need to if it exists: ---------- for _, v in pairs(game:GetDescendants()) do ----- local function Main(InstanceItem) -- You can also insert any parameters you'd like. -- Do whatever end ----- local TargetedItemName = 'Part' -- Name of the item your targeting. Set it to nil if you dont want to search by name. local TargetedItemClass = 'Part' -- Part, Script, LocalScript, Sound, FloorWire, etc. Set it to nil if you dont want to search by class. ----- if TargetedItemName == nil and v.ClassName == TargetedItemClass then Main(v) elseif TargetedItemClass == nil and v.Name == TargetedItemName then Main(v) elseif v.Name == TargetedItemName and v.ClassName == TargetedItemClass then Main(v) end ----- end
@quinnsaunders64153 жыл бұрын
Looping through game descendants requires a lot of computing power, especially players with not-so-optimal computers (or phones) which is the majority of the ROBLOX platform. Also, tagging allows you to target groups of parts with different names and is a lot easier to read anyway. While it's not needed, it's much more readable and flexible.
@Gvistic2 жыл бұрын
Plus you don't get the cool dynamic collection service functions such as "GetInstanceAddedSignal" or "GetInstanceRemovedSignal"
@doggosaurs34893 жыл бұрын
How to you get all this knowledge from?
@krizzIord Жыл бұрын
is this possible with models instead with parts?
@OcnarfPro3 жыл бұрын
B Ricey
@Taliofgaming69 Жыл бұрын
The plugin is unavailable tho D:
@calixisgreat Жыл бұрын
Not working
@mong18493 жыл бұрын
Paul Joseph Watson
@L3G5ND3 жыл бұрын
Thanks
@jimmytarn10763 жыл бұрын
first
@templed20213 жыл бұрын
first
@miffclick33582 жыл бұрын
couldnt u just do this with a modulescript
@goofymanmike6233 жыл бұрын
Can you make a tutorial on how to make a rocket (body velocity )