How to Make a Collector (Tycoon)
Download – Collector Model
How To – Make a Collector on Roblox Studio
What’s up everyone welcome to buzzygames, today I’ll be teaching you how to make a Collector for your game!
- So in our previous video we made a dropper, we have our conveyor belt and last but not least we just need a collector to collect our parts that drop from the dropper!
- Alright, so first things first we’re going to go ahead and grab a part. I’m going to make it a little bright a little neon just to signify that this is the dropper. So you don’t have to make it as bright as me but this is just personal preference and I like to make things pretty glowy and then once we have that part done.
- We’re going to go ahead and rename this part to “sellzone” and then make sure to have this part inside of our dropper model.
- Next thing you want to do is add a script inside of server script service. So we’re going to go ahead and create our leader stats value that will count the amount of money that is collected anytime the collector you know, collects the parts that drops into the collector and this value is going to show up on our screen later when we hop onto our game. Add one more line of code inside of our dropper script which is drop.name = drop and that’s all we’re going to do for this script
- So inside of our dropper model we’re going to add a string value and then we’ll be renaming that to “owner” so we’re going to reference the string value in just a second.
- In our switch script we’re going to add one line of code, inside of the switch script which is dropper.owner.value = player.name
- So essentially this dropper is going to belong to the player that turns on and off the switch
- We’ll be adding one more script inside of our “sellzone” part. So first thing we have is our variables here and now we’re going to create a function where if the other part.name = drop so the part that is dropped onto our conveyor belt and into our collector then it’s going to get destroyed. So once it’s destroyed then the leaderstats value is going to increase by one. So for any part that drops into the collector then our leaderstats or money value is going to increase by one so you can change the value of how much you want for each part to amount to anything you want but i’ll just set it to one.
- So let’s go ahead and hop back on to the game and see if it works! Okay so it is collecting but the leaderstats value isn’t updating. All right so I’m gonna go ahead and find the error real quick. Okay so it seems like I put a period instead of a colon, I’m going to go ahead and change that and it should work right after this fix!
- So hopping back onto our game I’m going to turn on our dropper and let’s see and there you go you’ll see that in the leaderstats value the money value is increasing after each time the collector collects the drops!