Roblox Tycoon Scripting Tutorial (Part 2)
Part 2 where we will learn how to set up the buttons and position items on a player's plot. This series of videos will show you how to make a tycoon on Roblox in 2024, we will be going through everything you need to script in order to make a basic tycoon. More videos coming soon.
Project files available to Premium channel members: kzread.infojoin
Video for members on how to download project file: • How To Access Project ...
Discord: / discord
Twitter: / alvinblox
Roblox: www.roblox.com/users/14943069
Пікірлер: 208
Become a channel member to get the project file and source code: kzread.infojoin / Part 3: kzread.info/dash/bejne/dZOfmKeYZJzSlMY.html
@AlterAccountMr.Laurinoss
3 ай бұрын
Please give Freee please MAKE ITTTTTT why you want 5$????????????
@ns33333
Ай бұрын
He literally explained it in these videos, why do you need it automatically when you can just make it with his tutorials
I'm a 14 year old Brazilian, my dream is to own a great Roblox game, to make it happen I use your videos, the only problem is that I don't have many people to help me with the project, but still, thank you Alvin ❤️ 👍
@BubBBleBoy
4 ай бұрын
Hope your dream comes true 🍀
@MiguelVidal-mh4ie
4 ай бұрын
@@BubBBleBoy Thanks man, may the same happen to you, one day you'll be playing my Roblox game 🫡👊🏻
@amacszuzayl2322
4 ай бұрын
@@MiguelVidal-mh4ie.If you want, we can be a team together. We can make games with our experiences.
@AlvinBlox
4 ай бұрын
Love to hear this! All the best my friend
@ELLA_NOIS
4 ай бұрын
I hope your dreams come true Miguel
I thought I was a fast typer, now I realised something…
Hey Alvin, keep up the good work, your videos are the reason I´m interested in scriptinh
thx you dude! ive been wanting to make one for like.. years!
when you are coding this make sure its the same cuz i was stuck on the button going to the plot and i put cfame not cframe in one of the spots
Thx for the help alvian also could you make a series on how to make a story game i know you have done this topic before but can you do a video on how to make a modern story game with all of the cutsence Boss Fights badges and Vote to get an ending?
Alvin is a great content creator!
It would be nice if you could teach us the "Proximity prompt" alternative. Thanks! Love your vids!!
Bro i am new to your channel but this video helped me more than i could think so thank you for a nice and helpfull video i have subscriber🙏🙏🙏🙏🙏🙏🙏🙏❤❤❤❤❤❤❤
He came backk!!!!
you could disable clips descendants instead of changing size to smaller
this took me so long😅
Nice vid :D
tysm alvain
Hello AlvinBlox, you've made great improvements since your last tutorial, good job on avoiding nesting as well as learning new features in studio, although there are better ways to do this, you've made great progress.
@AlvinBlox
4 ай бұрын
I don't disagree however this is not a bad tutorial in any way shape or form as a result, this is a basic tycoon series which I am designing from scratch and we will get better and learn as we go along
@blueshell_dev
4 ай бұрын
@@AlvinBlox yes you’re correct, this is definitely a better tutorial than some KZreadrs post.
I don’t even plan to make one lmao I just think it’s cool to watch tbh
can you make it so the buttons gradulaey appear like you purchase the first then second and maybe make it so the items slowly fade in :) also do you release the source code?
@AlvinBlox
4 ай бұрын
Source code is available to Premium Channel Members via my Discord server. You will need to connect your KZread account with Discord in order to view the project-files channel.
Isn't there a more organized way to identify an purchable item? because using numbers(ID) can make you easily lose the item in the middle of the tycoon, and if to change one item you will have to look around the ID of the item all across the tycoon. I wonder if this will work well with strings instead of numbers...
Thank you
Hey, great video, but i am having trouble with the BaseParts not spawning at the new plot and only on the original Template plot
Alvin if u have any time i rly need help as i did smth wrong but i cant find it as i got 2 problems, first the poster spawns in the button and second when the button dissapears when i step on it it stills spawns 4 posters and not one
i just had a single error and i fixed it thx assistant.
Hi Alvin great tutorial, just need help it says TemplatePlot not apart of workspace how to i fix it
Hey Alvin! Could you also make a Part 7 where you could add a purchase button that expands the tycoon?
the model spawns right where the button was how do i fix it? great tut btw!
you know what would be great, a incremental tutorial (games like grass cutting incremental, generator incremental, etc)
@ooaktree
4 ай бұрын
im starting trying to learn coding on roblox but i hit a roadblock where i don't know how to make a textlabel change based on the varabile of how many times a part is clicked (my first game is gonna be very simple)
@RandomGuyOnDaFreakingNet
3 ай бұрын
@@ooaktree its really not that hard, just get a ClickDetector setup on the button you wanna click, add a script to your button, then just make a variable like 'local clicks' and then write script.Parent.ClickDetector.MouseButton:Connect(function) clicks = clicks + 1(or your desired amount) end
@AaronLyNxAI
2 ай бұрын
@@ooaktree use linear copilot or similar resources, also for updating a text label for cash I currently use this: -- LocalScript under the GUI button local ReplicatedStorage = game:GetService("ReplicatedStorage") local UpdateCashEvent = ReplicatedStorage:WaitForChild("UpdateCashEvent") script.Parent.MouseButton1Click:Connect(function() -- Assume the amount is predetermined or maybe calculated based on some logic local amountToAdd = 1 UpdateCashEvent:FireServer(amountToAdd) end) on the client side, and this: -- Script in ServerScriptService local ReplicatedStorage = game:GetService("ReplicatedStorage") local UpdateCashEvent = ReplicatedStorage:WaitForChild("UpdateCashEvent") local function updatePlayerCash(player, amount) -- Safeguard to ensure leaderstats and Cash exists local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then return end local cash = leaderstats:FindFirstChild("Cash") if not cash then return end -- Update the player's cash cash.Value = cash.Value + amount end UpdateCashEvent.OnServerEvent:Connect(updatePlayerCash) on the server side. Keep in mind, this uses another script for a button in the GUI the player can click to earn money. This code may be helpful for you, so long as you modify it some to better suit your needs
Would this script work for more droppers/models/parts? To include them would I need to write more code on my own or can I use the one provided in the video? Thanks for an answer in advance
@BlackFoxPlayz
Ай бұрын
works for more. As long as they have all of the attributes you don't need to write any more code
what to do i have mesh parts and when i step on the button it spawns on template plot location
Hey Alvin when I was coding from this vid I ran into a problem it says CFrame is not a Valid number of folder "Workspace.TemplatePlot.Buttons" Can you help
something is not working at the end of the video and i noticed that you put local itemcframe but did not put = ... i wonder if that is what making it not work but it works for you
good video
fixed it but the other parts of my model arent coming to the place theyre supposed to be in and theyre not in the folder
Tysm! This was really helpful:D Your the best person I know that knows what you are doing:D
I wish you wouldn't zoom so much and just show the whole screen all the time - else awesome content mate :)
Just so yall know, when i wrote the code, I had bugs. Few capitalization errors and using . Instead of : (used to java programs). Chat gpt can help identify and explain the problems if needed
are you coming back to youtube alvinblox?
ty
Hey Alvin! I am using MeshPart Models for the buttons, however they aren't working any tips? Esepcially the Touched event
@idontcare4875
2 ай бұрын
maybe try putting an invisible part inside the mesh, so that while it looks like your mesh button, you're actually touching a regular part? Just a suggestion, might not work
i did everything right but were do you need the x and y thigns cause i copyied everything right and it jsut did not load on my plot im getting out of motivation
Hello i love ur vids really helpful but i don't know why but its not clone the item i want u can buy can u help
If all plots are to have the same items, would the IDs mess that up? So take the poster for example, which has been given an ID of 1, if I were to copy/paste that poster and its button to all plots would it matter that they have the same ID on different plots or would it not matter because it's a different plot? I don't want to end up buying a poster on someone else's plot if you get what I mean. Sorry if I didn't explain very well.
@AlvinBlox
16 күн бұрын
no it wouldn’t matter
Good
@AlvinBlox, can you help me? Even though I touch the part, the poster is not appearing. PLEASE HELP!!!
I noticed near the end when you step on the button and the item multiplies, they say to do a certain code to delete the button after you step on it that did not work for me. Instead of doing that, insert a script into the button with this next set of code and it will delete on touch; function touch() script.Parent:remove() end script.Parent.Touched:connect(touch)
What’s that plugin that’s displaying the parts size when you scale it
@adnan14120
4 ай бұрын
I think it's a beta feature.
@chess-and-facts
4 ай бұрын
new feature
Hey, for some reason the things from the TemplatePlot are not spawning to the plots given to the players. I have seen quite many other people in the comments having the same issue.
@BobBloxer
4 ай бұрын
Use the output to check if theres an obvious issue its seeing
👋As a roblox developer i dont agree with your way of asigning models to the buttons, it would be really tedios to every time you add a model scroll down to the attributes, click add atribute, set the type to number (allthough as you pointed out it can be a string) and remember witch id it is supposed to be and do the same for the coresponding button, i would just add an... i think its called object value or instance value into the button and set it to the instance model it is supposed to be connected to.. also it would be much more efficient cuz the code does not have to check everything, it can just get the instance from the value that said your solution is valid and coded good just not really efficient... i hope you see this actually, i want to know why you didnt use the instance values, did you just not think of it?
@frankie4073
4 ай бұрын
I work with object values all the time, it definitely saves a lot of time (and loc), I've done the old way as well and its an absolute horror to work with now
@NikolasH123
4 ай бұрын
yeah uhh.. so alvin, if you read this and you dont have more like pre-made episodes, you can change it if you want, feel like it would be a better example of tycoon game code that way
@NikolasH123
4 ай бұрын
@@frankie4073 yeah they can be usefull, its a shame we cant make object attributes
@human721
4 ай бұрын
I agree. I really dislike the style in which he makes these games. A lot of inefficient scripts and overcomplicated things for no reason..
@frankie4073
4 ай бұрын
@@NikolasH123 object attributes could be useless though, object values are there to exist to get object in the game via scripts more easily and without worries of filtering enabled. For example, I use dynamic object values from time to time, that would get useless sometimes, means more workarounds for me
hi
Hey Alvin and all other scripteres idk why but my item from the template dosent seem to get into a plot when i join do any of u know how i can fix this problem Thanks😄
Line 30 (26 for me) is in need of debugging like it will not play it just says rendering paused for debugging Also button. Parent=ButtonsFolder (line 72 with 1 note) has red squiggles ((Also it didnt go over to another plot like it should when i was testing earlier)) Pls help
I followed your exact code but I didn't use the poster but made my own dropper yet when I step on the button it doesn't make a new dropper at the place I want it to. It doesn't make a new dropper at all. Any ideas on how to fix this issue?
@mxdnxxss7529
Ай бұрын
It is made of 3 parts and I don't know if that maybe the issue
@mxdnxxss7529
Ай бұрын
Now done exactly what he did with just a different model from toolbox and still doesn't work
Hi AlvinBlox, I keep getting the error Touched is not a valid member of Model “Buttons.Button” Any ideas?
i have the problem when i directly stepped into the button, it sometimes generate like 2 droppers/models/parts
i dont know what im doing wrong, but when i step on the button, it dissapears but he model that i want it too show isnt showing
yessir
nezur v2 came out?
Can someone please share their working code I have been trying to see what I did wrong for hours but I cant find anything.
can you help me it says Touched is not a valid member of Model "Buttons.ButtonModel" - Server - PlotHandler:35
I put the item as a conveyor and near the end of the video I was confused why the conveyor wasn't appearing so I checked the output multiple times and it kept saying that I forgot to put the id thing and after 10 minutes I was looking at id part of the video and I looked at the id name I put and I accidentally put "IdOfItemToUnlocked" LOL
@RandomVideos-xi1vl
Ай бұрын
Oof
I took a model as a button and also adjusted everything to pivot as you said, and now I'm getting the error message: 'Touched' is not a valid member of Model 'Buttons.Button'. What did I do wrong?
@dercrafter2790
3 ай бұрын
And I also tried it with a part as a button, and it worked then...
should i write in camelCase or not?
For some reason it says “MenuCamera is not a valid member of Workspace”Workspace” in output.Did I do something wrong?
For some reason my plots come with the model that you used (being the missing noob poster) in the Items folder. can someone help?
Sorry to sound like a bummer because I know I definitely made a little mistake, but every time I start the game : 18:03, it spawns my button outside of the map, if anyone could help that would be great❤
i did the exact same things as you and it s not working when i step on the button the model doesn t pop up
1:22 set the video speed to x2 and listen to the Minecraft glass breaking sound effect.
Guys what about model? Where it says Templateplot is not a valid member of workspace? Alvin plz help bc you only fixed it for people with part
grat tuto but i get a frickin eror in line 8 in plot handler idk what is the issue
Edit; Fixed the issue, used RelativeCFrame instead of RelativeItemCFrame. Great video, it's helping me a bunch to learn more about coding and tycoon making, only problem I am having, however, is that whenever I go ahead and purchase the part/model, it gets placed in the spot of where the button was. Any possible fix for this would be greatly appreciated, been stuggling with this specific issue for a bit, watched the video in and out and see no reason for this to be happening.
@solarance
2 ай бұрын
You have to be sigma to fix it
@RLPlayer1
Ай бұрын
@@solarance "u gotta be a sigma skibidi 🤓" shut up kid
i have placed spawner as clone object it doesn't clone it , it clones like only base but not all together with script, can help?
@thelonestar_0336
2 ай бұрын
Did you figure that out?
at the 31minute mark u get the items but it doesnt give me the model at all not even placing at the original plaace.
WHAT DOES Touched is not a valid member of Model "Buttons.Button" MEAN??
@chess-and-facts
4 ай бұрын
It means that button is likely a model and not a part
@chess-and-facts
4 ай бұрын
make sure "CanTouch" is true in properties
18:12 All that was there for me was the text label, and no button. Any help?
i have a question. i followed the script up to where the button should appear on other plots, but it tells me ‘TemplatePlot is not a valid member of Workspace “Workspace”’. any clue what’s happening??
@bloxcontre
2 ай бұрын
He changed something in the script, watch what happens after.
@finn.b.is.here.
2 ай бұрын
@@bloxcontre right, sorry
what if you want the plot to be a model
Hey Im Sorry Maybe I Dont Understand But When Me Make The Button My "Starter" Text Was Be Inside The Part... Pls Recomment
what if the button is a mesh part?
Did you fix the issue with your character not spawning on your plot?
@AlvinBlox
4 ай бұрын
We'll get to that in a later video, but for now just use the Play Here button to teleport to where your camera is
@Tablita7288
4 ай бұрын
@@AlvinBlox ok thanks
when p3
I have a squiggly under "itemToUnlockId" in Line 40 saying 'Unknown global 'itemToUnlockId' 😔
On line 53, it says that there's an invalid argument, but i checked to see if it was wrong like 20 times but it was correct.
Everything worked but when i pressed the button the missing noob poster was inside the button.
Guys can you help me, my model isnt spawning in good place, how to fix this?
For some reason, the script does not work for me when i entered everything correctly. Any suggestions?
Alvin can u pin me i like ur vids
fire breathing dragon
I have a problem my code is exact copy but when I tread on button it disappears and the part does not appear and it is in explorer as it should be anybody got any ideas as to why
Im getting an error message saying that touched isnt a valid member of Button help me please
18:45 what if i want it to be a proximity prompt?
after the coding it says an error: Touched is not a valid member of Model "Buttons.Button" - Server - PlotHandler:30, and my button disapeared :(
Tsm
i have a problem when i do ItemClone.Parent = ItemsFolder button:Destroy() it destroy the button when i just spawn pls help
@chess-and-facts
4 ай бұрын
could you add the entire script?
@RagingDemon-rz4gu
4 ай бұрын
@@chess-and-facts ok
Why does it still clone/ duplicate the item twice for me? I followed the next vid and it also deducted the cash twice. I already put Button:Destroy()
@NotOliver9612
3 ай бұрын
At 26:49 i joined and did not get a plot
@ZeeloVR
2 ай бұрын
i got the same problem, did u fix it?
Please put subtitles or something in Portuguese
It is saying parent is not a valid member of folder buttons
what to do if it says "You forgot to add an IdOfItemToUnlock attribute"
@AaronLyNxAI
2 ай бұрын
You have to make sure the button has an Attribute in the properties tab that is named "IdOfItemToUnlock" and that the value of that ID is the same as the "Id" of the object you are unlocking
My part does not appear
YOURE the best content creator just i have a problem it says template plot is not a valid member of workspace
The clone to other plot doesnt work for me 18:05
@angrygamez7750
2 ай бұрын
same here, everything was going smooth until this point. i need help as well :/