Roblox Tycoon Scripting Tutorial (Part 5)
In this video we will learn how to save our items and cash to a Roblox Data Store so that player progress can be saved and loaded.
Get the project file by becoming a Channel Member: kzread.infojoin
Video for members on how to download project file: • How To Access Project ...
Next part: • Roblox Tycoon Scriptin...
ProfileService module: create.roblox.com/store/asset...
ProfileService documentation: madstudioroblox.github.io/Pro...
DataStore editor plugin: create.roblox.com/store/asset...
Discord: / discord
Twitter: / alvinblox
Roblox: www.roblox.com/users/14943069
Пікірлер: 152
Next part: kzread.info/dash/bejne/mXdnus5-j9ywldY.html / Get the project file by becoming a Channel Member: kzread.infojoin
@naaboom8276
4 ай бұрын
is it permanently member only?
@berndonclin7437
4 ай бұрын
@@naaboom8276 no, he always uploads his videos 24h earlier for members
@naaboom8276
4 ай бұрын
@@berndonclin7437 thanks for the reply. i would really want to become a member to support but i'm not financially secure enough to do so yet.
@yusufkouba2449
Ай бұрын
the plugin says its 9.99 USD so how do i do it.
In case anyone is having an issue with the scripts not being enabled when rejoining the game, make sure you also copy the for loop that enables the scripts to the loadItems function as well
@dogeclan4957
3 ай бұрын
TYSM
@Wakles
20 күн бұрын
Thanks bro!
@primepug
5 күн бұрын
can you explain this more thoroughly i dont fully understand what i should do
I’m loving these videos they’re really helpful
This is great Alvin thank you so much.
yet another awesome video from alvin :D
Loving this series, and that datastore editor plugin is the best 100 robux I've ever spent 🕶
Even though I had so many errors I got it to work, those problems help you develop the debugging skills
me at a random part of video: "Gets distracted by a toy thats randomly on my desk" tbh I had to rewind the video to where I got distracted😂🤣
I've been trying to make a tycoon and this popped up on my 4upage THANKS!
yess first i love these videos i was scared u wasnt gonna post
Hello! I saw you have some really great tutorials and I was wondering if you have posted a tutorial on how to script a riding horse?
So I've followed the tutorial with no major issues so far but now I've ran into the problem where I do this and the items dont move to the plot when they are loaded. Any ideas why?
Woo! Amazing vid again.
Second lol, btw, does this mean that you are going to do more tutorials again?
Yesss, I can watch the next part, woohoow😊
I have a issue, so when i purchase an item using the button (after we finished the datastore) the item appears to be spawning in the TemplatePlot, any solutions?
How to change the rotation of two plots so that they are in front of the other two plots?
Edit; Found and fixed the issue, make sure your attribute for the button is correct in response to the load Currently looking into it, but, I'm running into an issue where the button doesn't get saved as destroyed. Any fix for this?
@Senjor290
2 ай бұрын
can you explain or maybe somehow make a video?
how can i reset the data without the plug in cuz my droppers are somehow not working
when you buy the dropper and conveyor, you re-join everything has been saved but the dropper doesnt drop things and the conveyor doesnt move... please help :(
@BlackFoxPlayz
2 ай бұрын
I had the same bug, and if you look closely, Alvin did too but didn't notice it. To fix it, i had to reenable the dropperscript, collectorscript, and beltscript, then just move the template tycoon out of sight from the rest of the game. Good luck!!
can you make another tycoon video where you explain how to add purchasable items in robux?
@A0V1
4 ай бұрын
You can already do that, just make a button have a item ID, and another button spawn a button.
I can't get it to load properly. I tested it, I bought stuff and left, but when I tested it again, it loaded my leaderboard stats, but my plot was completely empty. Not even the buttons were there. Does anyone know why this could be?
hey dude nice vid but ive encountered an error that i dont know how to fix , after i followed every thing at the end the buttons didnt even appear for me
I got an error in line 22: 'attempt to iterate over a nil value'. Also the Buttonsfolder or anything aren`t spawning. Can anybody help?
@hihawa
Ай бұрын
Can you solve this problem? because I have the same one
@Wanderlin-by9mi
Ай бұрын
I got the same problem too
@xx5scorpionxx78
26 күн бұрын
same issue too xD Did u find any solution already?
@MariahLopez51202
25 күн бұрын
it may be missing a )
@matzyman306
25 күн бұрын
@hihawa , @Wanderlin-by9mi , @xx5scorpionxx78 I still have the error, but I have found out, that when u delete the function, loadItems, from the script, its working. I think it is something wrong with itemId, but I dont know. Hope u find out.
These tutorials are very much helpful. I also have a newfound respect for all games whether or not I like them seeing the way tycoons have to be made(I thought it was simple). I have a problem, though. Cash doesn't save for the player when they rejoin. Any ideas as why this is?
@Louis-ot5op
Ай бұрын
Do you have an error?
@Arcane_Dragon
Ай бұрын
@Louis-ot5op No, I don't have an error. I does save my data will save, but it never does? EDIT: it says* my data will save
@hihawa
Ай бұрын
@@Arcane_Dragon could you help me because I have some errors
@Arcane_Dragon
29 күн бұрын
@@hihawa What kind of errors ya gettin'?
@hihawa
29 күн бұрын
@@Arcane_Dragon ServerScriptService.PlotHandler:25: attempt to iterate over a nil value - Server - PlotHandler:25 25:for _, itemId in itemIdsTable do
The data storing tutorial actually worked, but there is one problem. When the players join back and the game loads in the dropper and conveyor that the players bought, they stop functioning (conveyor no longer moves, and droppers no longer drop). How can I fix this?
@FireCobra
4 ай бұрын
I have the same problem
@zoeilgatrblx6713
4 ай бұрын
Enable the Script on the Conveyor or the dropper
@FireCobra
4 ай бұрын
@@zoeilgatrblx6713 If I did that wouldn't it crash because of too many parts? I don't know really that's why I am asking
why do 3 of my droppers spawn when I restart from save?
could you make a video on how to make the buttons appear on a specific order so that a button will appear only after you have already bought a specific item
@MilkyAnimations
4 ай бұрын
YES! PLEASE
@CyrusTheVirus-sr4xu
2 ай бұрын
it is in part 6
@righthandman7330
2 ай бұрын
@@CyrusTheVirus-sr4xuI commented this before part 6 came out
@CyrusTheVirus-sr4xu
2 ай бұрын
@@righthandman7330 K K
The solution for the Conveyors and Drooper not working after rejoining. Simply enable the script when the Conveyour and Drooper is cloned to the plot!
@sma8357
3 ай бұрын
how do u do that
I try to make a tycoon with your tutorials, they are amazing. But i have a little problem, when i am loading the game again and i bought the dropper and conveyor the last time then the dropper doesn't drop things and the conveyor doesn't work. Do you have a solution for this? I can't figure it out by myself...(ps. in your world it does the same when you were loading the world again)
@minehutminehutcreations7938
4 ай бұрын
ou gotta add for _, scriptObject in itemClone:GetDescendants() do if scriptObject:IsA('BaseScript') then scriptObject.Enabled = true end end on the loadItems function you could have figured this out yourself
@michaelklomparends7832
4 ай бұрын
Sorry, that i can't figure it out by myself@@minehutminehutcreations7938 . I am still a beginner at scripting. It is working now. Thanks for your help👍
@zerol3gend5
3 ай бұрын
@@minehutminehutcreations7938 posting the same answer on all the questions asking this without a section on where to put this script is pretty redundant.
why does my dropper not drop the drops when i restart the game
How do I tell which plot is mine
so, if i wanted to add a button for a person to wipe their progress, how would I make that?
@anthonygaming7268
24 күн бұрын
just use the datastore editor and if ur data name is PlayerData then connect using that and the Key is Player_"Your user ID" and you can click the little trash/garbage can icon button to wipe it! :D
@YeetYourself99
24 күн бұрын
@@anthonygaming7268 tysm! :)
Hi so i got a probleme in the last part when i bought everything everything was good but when i rejoin nothing spawn. Any help for fix my problem?for being more precise my folder items is not in Plots.part
@vemmello
2 ай бұрын
Problem IS fixed so good
@Senjor290
2 ай бұрын
can you tell me how you fixed it? @@vemmello
I ran into this issue where the data saving works with all my items, when i load back in to test it the dropper is no longer working, like it stops dropping blocks for money, is there a way to address this issue?
@dualspike
20 сағат бұрын
make sure you also copy the for loop that enables the scripts to the loadItems function
Really nice video but how can i make so that when i press button for dropper i unlock to buy dropper 2 like the button spawns someone pls help ALVIN GREAT VIDEO
@eduardo_332
4 ай бұрын
About the button, you can make that when you buy an item, you buy another button together, by making that button the same ID as the item
@YT_weakyunus
4 ай бұрын
Thanks but thats not really what i meant@@eduardo_332
@berndonclin7437
4 ай бұрын
@@eduardo_332 yes and no, it´s a little bit more diffuclt
@minodigital328
4 күн бұрын
Yea I tried doing that by having another button in the items folder first, then when it gets unlocked change its parent to the buttons folder. But, it didn't work out
nice video
to spawn in your tycoon, 1)add spawn point into/onto each plot (yes in plots folder), 2) in PlotHandler script, add the following right before "local ItemsFolder" functions, put : local plotSpawn = Plot:FindFirstChild("PlotSpawn") if not plotSpawn then warn("No spawn point found in plot for " .. player.Name) return end plotSpawn.Neutral = false -- Make the spawn point specific to a player/team plotSpawn.TeamColor = player.TeamColor -- Only necessary if using team mechanics player.RespawnLocation = plotSpawn and then after the "local items" and "local buttons" put : local plotSpawn = Plot:FindFirstChild("PlotSpawn") if plotSpawn then plotSpawn.Neutral = false player.RespawnLocation = plotSpawn print('SpawnPoint Found') else warn("No spawn point found in plot for " .. player.Name) end Change the name of spawn point to "PlotSpawn" or change "PlotSpawn" in script to whatever the name of your spawn point is.
@MariahLopez51202
26 күн бұрын
if theres any errors, script service will help you put each function in the correct spot of the PlotHandler script.
all my items are quadrupled I dont know how to solve it
does anyone have a fully working script bc I have a problem
The droppers dont work after rejoining how do i fix it
@Legend1O1
3 ай бұрын
for _, scriptObject in itemClone:GetDescendants() do if scriptObject:IsA('BaseScript') then scriptObject.Enabled = true end end itemClone.Parent = ItemsFolder add this in the load items function on plot handler
@Adrianblah
2 ай бұрын
bro is actually a legend tysm man @@Legend1O1
@primepug
5 күн бұрын
@@Legend1O1 bro thank you so much
there is a bug where after the dropper loads it does not work. the conveyor has the same bug
@minehutminehutcreations7938
4 ай бұрын
you gotta add for _, scriptObject in itemClone:GetDescendants() do if scriptObject:IsA('BaseScript') then scriptObject.Enabled = true end end on the loadItems function
@matthewcrispino
4 ай бұрын
Yo can you explain
@matthewcrispino
4 ай бұрын
Where in what script
@longquach2877
4 ай бұрын
@@matthewcrispino did u find out what script and line?
@Eggowaffle.
3 ай бұрын
@@minehutminehutcreations7938 what line in what script?
alvin
Guys can someone help me? for some reason the first time when i load in the conveyor and the dropper work well, but when it saves and i load in again they stay disabled. if anyone knows a solution can you reply
@vemmello
2 ай бұрын
i have the same problem lol
@vemmello
2 ай бұрын
Nvm i fix it
i cant join ur discord server
the things dont load?
Scripts doesn’t starts… (dropper, conveyor) yeah…
@minehutminehutcreations7938
4 ай бұрын
you gotta add for _, scriptObject in itemClone:GetDescendants() do if scriptObject:IsA('BaseScript') then scriptObject.Enabled = true end end on the loadItems function you could have figured this out yourself
Hi
thanks for the video but why doesnt the dropper work if you join again?
epic video
have you made any maps that i could play?
liked
Hello I got some problems with data saving the problem is that it doesn’t load it cash is loading but the stuff I bought didn’t can you help me
@rady_meme1582
4 ай бұрын
Oh it was my problem bcs I write id and not Id
🔙😊
This guys voice changed so much since the last time i watched his videos
@Foxie16713
4 ай бұрын
Straight up makes me think bro was 9 like 4 years ago with Alvin and Chipmunks voice and now sounds like an actual adult kind of
when the player exits, the tycoon remains in the same place and does not disappear
@MariahLopez51202
25 күн бұрын
at the bottom on the players removed function, put Plot:Destroy() if it makes the tycoon disappear, you'll have to make sure its in the right spot of the script
@coolcons1930
13 күн бұрын
@@MariahLopez51202 no don’t destroy the plot instead destroy the folders
I had to redo the tutorial just to redo this tutorial 😭 💀 🙏
Once the things load the droppers and conveyor DONT START
would u have another time to revamp your 2020 and 2021 playlist scripting guides into 10 min 2024 scripting guides?
uh the leaderstats gone missing edit: nevermind I fixed it I forgot to add player in PlayerAdded()
not saving my cash D:
can someone drop me whole codes beacuse my chat gpt destroyed everything
plugins now cost real money 💀
hi, I want to make a Roblox game where you are a goat and you have to kill other players but can you make a video where you show how to become an animal
Thanks but no thanks. I tried to follow this tutorial but got stuck on the second video near the end where you make mistakes. I got similar errors like you do too in the video but on different lines than you and had no way of correcting them. And i had to abandon the whole project!
@travelingbeast1
3 ай бұрын
You must of done something wrong then. All of the second video works
@CT2507
3 ай бұрын
@@travelingbeast1 Yea who knows! He goes too fast when he reaches the mistake parts. He never makes test runs during the video, so as a beginner I get lost.
What about Rebirth?
20 sec ago
@minehutminehutcreations7938
4 ай бұрын
yeah but i am a member so i was first little man
@impekachh
4 ай бұрын
@@minehutminehutcreations7938 fuc
@CyrusTheVirus-sr4xu
2 ай бұрын
@@minehutminehutcreations7938 he was not saying he was first he said the video was realesed 20 secs ago and ur not a memeber
WAIT.. YOU'RE THE TPS COMMENTATOR
@chippyeditz
2 ай бұрын
He is lol
😘
Can you make a free model of it?
Early people 👇
@minehutminehutcreations7938
4 ай бұрын
i was first lmao
mj
I wonder why you didn't upload for 7 months?
waaht
it doesn't start the scripts tho ha ha
@rady_meme1582
4 ай бұрын
Yeah that’s true
@zoeilgatrblx6713
4 ай бұрын
The solution for the Conveyors and Drooper not working after rejoining. Simply enable the script when the Conveyour and Drooper is cloned to the plot!
Alvin:pins Me:yeeaeaeaeae
I got this error in the output: ▶ No Plot Owner User Id (x162) - Serveur - CollectorScript:12 someone can help me there is my collector script : script.Parent.Touched:Connect(function(hit) if hit:GetAttribute('CashToGive') then local Plot = script.Parent.Parent.Parent.Parent if not Plot then warn('No Plot') return end local PlotOwnerUserId = Plot:GetAttribute('Owner') if not PlotOwnerUserId then warn('No Plot Owner User Id') return end hit:Destroy() -- found the plot owner local PlayerObject = game.Players:GetPlayerByUserId(PlotOwnerUserId) PlayerObject.leaderstats.Cash.Value += hit:GetAttribute('CashToGive') end end)
Promo-SM 🤭