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

  • @AlvinBlox
    @AlvinBlox4 ай бұрын

    Next part: kzread.info/dash/bejne/mXdnus5-j9ywldY.html / Get the project file by becoming a Channel Member: kzread.infojoin

  • @naaboom8276

    @naaboom8276

    4 ай бұрын

    is it permanently member only?

  • @berndonclin7437

    @berndonclin7437

    4 ай бұрын

    @@naaboom8276 no, he always uploads his videos 24h earlier for members

  • @naaboom8276

    @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

    @yusufkouba2449

    Ай бұрын

    the plugin says its 9.99 USD so how do i do it.

  • @joshisasquare
    @joshisasquare3 ай бұрын

    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

    @dogeclan4957

    3 ай бұрын

    TYSM

  • @Wakles

    @Wakles

    20 күн бұрын

    Thanks bro!

  • @primepug

    @primepug

    5 күн бұрын

    can you explain this more thoroughly i dont fully understand what i should do

  • @Therealnotanifox
    @Therealnotanifox4 ай бұрын

    I’m loving these videos they’re really helpful

  • @BlackFoxPlayz
    @BlackFoxPlayz2 ай бұрын

    This is great Alvin thank you so much.

  • @CyrusTheVirus-sr4xu
    @CyrusTheVirus-sr4xu2 ай бұрын

    yet another awesome video from alvin :D

  • @ubercraft5678
    @ubercraft56784 ай бұрын

    Loving this series, and that datastore editor plugin is the best 100 robux I've ever spent 🕶

  • @luxxxurymercedes
    @luxxxurymercedes3 ай бұрын

    Even though I had so many errors I got it to work, those problems help you develop the debugging skills

  • @MoonDrop_Real
    @MoonDrop_Real4 ай бұрын

    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😂🤣

  • @ghostume
    @ghostume4 ай бұрын

    I've been trying to make a tycoon and this popped up on my 4upage THANKS!

  • @minehutminehutcreations7938
    @minehutminehutcreations79384 ай бұрын

    yess first i love these videos i was scared u wasnt gonna post

  • @katherinehill4126
    @katherinehill41264 ай бұрын

    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?

  • @yeetboiaug9615
    @yeetboiaug96153 ай бұрын

    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?

  • @dramaticstrawlk3195
    @dramaticstrawlk31954 ай бұрын

    Woo! Amazing vid again.

  • @valkryxdoesdesign
    @valkryxdoesdesign4 ай бұрын

    Second lol, btw, does this mean that you are going to do more tutorials again?

  • @berndonclin7437
    @berndonclin74374 ай бұрын

    Yesss, I can watch the next part, woohoow😊

  • @KethanRoblox
    @KethanRoblox2 ай бұрын

    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?

  • @michaelklomparends7832
    @michaelklomparends78324 ай бұрын

    How to change the rotation of two plots so that they are in front of the other two plots?

  • @zerol3gend5
    @zerol3gend53 ай бұрын

    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

    @Senjor290

    2 ай бұрын

    can you explain or maybe somehow make a video?

  • @MC_Benny4882
    @MC_Benny4882Ай бұрын

    how can i reset the data without the plug in cuz my droppers are somehow not working

  • @Senjor290
    @Senjor2902 ай бұрын

    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

    @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!!

  • @Nicola-tn1sv
    @Nicola-tn1sv4 ай бұрын

    can you make another tycoon video where you explain how to add purchasable items in robux?

  • @A0V1

    @A0V1

    4 ай бұрын

    You can already do that, just make a button have a item ID, and another button spawn a button.

  • @beyondnerd348
    @beyondnerd34811 күн бұрын

    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?

  • @NOT_malek7
    @NOT_malek716 күн бұрын

    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

  • @matzyman306
    @matzyman3062 ай бұрын

    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

    @hihawa

    Ай бұрын

    Can you solve this problem? because I have the same one

  • @Wanderlin-by9mi

    @Wanderlin-by9mi

    Ай бұрын

    I got the same problem too

  • @xx5scorpionxx78

    @xx5scorpionxx78

    26 күн бұрын

    same issue too xD Did u find any solution already?

  • @MariahLopez51202

    @MariahLopez51202

    25 күн бұрын

    it may be missing a )

  • @matzyman306

    @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.

  • @Arcane_Dragon
    @Arcane_Dragon2 ай бұрын

    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

    @Louis-ot5op

    Ай бұрын

    Do you have an error?

  • @Arcane_Dragon

    @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

    @hihawa

    Ай бұрын

    @@Arcane_Dragon could you help me because I have some errors

  • @Arcane_Dragon

    @Arcane_Dragon

    29 күн бұрын

    ​@@hihawa What kind of errors ya gettin'?

  • @hihawa

    @hihawa

    29 күн бұрын

    @@Arcane_Dragon ServerScriptService.PlotHandler:25: attempt to iterate over a nil value - Server - PlotHandler:25 25:for _, itemId in itemIdsTable do

  • @longquach2877
    @longquach28774 ай бұрын

    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

    @FireCobra

    4 ай бұрын

    I have the same problem

  • @zoeilgatrblx6713

    @zoeilgatrblx6713

    4 ай бұрын

    Enable the Script on the Conveyor or the dropper

  • @FireCobra

    @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

  • @notMysticz
    @notMysticzАй бұрын

    why do 3 of my droppers spawn when I restart from save?

  • @righthandman7330
    @righthandman73304 ай бұрын

    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

    @MilkyAnimations

    4 ай бұрын

    YES! PLEASE

  • @CyrusTheVirus-sr4xu

    @CyrusTheVirus-sr4xu

    2 ай бұрын

    it is in part 6

  • @righthandman7330

    @righthandman7330

    2 ай бұрын

    @@CyrusTheVirus-sr4xuI commented this before part 6 came out

  • @CyrusTheVirus-sr4xu

    @CyrusTheVirus-sr4xu

    2 ай бұрын

    @@righthandman7330 K K

  • @zoeilgatrblx6713
    @zoeilgatrblx67134 ай бұрын

    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

    @sma8357

    3 ай бұрын

    how do u do that

  • @michaelklomparends7832
    @michaelklomparends78324 ай бұрын

    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

    @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

    @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

    @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.

  • @AlexPelletier-le7fi
    @AlexPelletier-le7fi2 ай бұрын

    why does my dropper not drop the drops when i restart the game

  • @ArjunPatrickStar
    @ArjunPatrickStarАй бұрын

    How do I tell which plot is mine

  • @YeetYourself99
    @YeetYourself993 ай бұрын

    so, if i wanted to add a button for a person to wipe their progress, how would I make that?

  • @anthonygaming7268

    @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

    @YeetYourself99

    24 күн бұрын

    @@anthonygaming7268 tysm! :)

  • @vemmello
    @vemmello2 ай бұрын

    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

    @vemmello

    2 ай бұрын

    Problem IS fixed so good

  • @Senjor290

    @Senjor290

    2 ай бұрын

    can you tell me how you fixed it? @@vemmello

  • @lanxetoast
    @lanxetoast2 ай бұрын

    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

    @dualspike

    20 сағат бұрын

    make sure you also copy the for loop that enables the scripts to the loadItems function

  • @YT_weakyunus
    @YT_weakyunus4 ай бұрын

    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

    @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

    @YT_weakyunus

    4 ай бұрын

    Thanks but thats not really what i meant@@eduardo_332

  • @berndonclin7437

    @berndonclin7437

    4 ай бұрын

    @@eduardo_332 yes and no, it´s a little bit more diffuclt

  • @minodigital328

    @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

  • @desicape
    @desicape4 ай бұрын

    nice video

  • @MariahLopez51202
    @MariahLopez5120226 күн бұрын

    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

    @MariahLopez51202

    26 күн бұрын

    if theres any errors, script service will help you put each function in the correct spot of the PlotHandler script.

  • @sla4594
    @sla4594Ай бұрын

    all my items are quadrupled I dont know how to solve it

  • @hihawa
    @hihawaАй бұрын

    does anyone have a fully working script bc I have a problem

  • @BryanHC08
    @BryanHC084 ай бұрын

    The droppers dont work after rejoining how do i fix it

  • @Legend1O1

    @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

    @Adrianblah

    2 ай бұрын

    bro is actually a legend tysm man @@Legend1O1

  • @primepug

    @primepug

    5 күн бұрын

    @@Legend1O1 bro thank you so much

  • @kingofgameing107
    @kingofgameing1074 ай бұрын

    there is a bug where after the dropper loads it does not work. the conveyor has the same bug

  • @minehutminehutcreations7938

    @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

    @matthewcrispino

    4 ай бұрын

    Yo can you explain

  • @matthewcrispino

    @matthewcrispino

    4 ай бұрын

    Where in what script

  • @longquach2877

    @longquach2877

    4 ай бұрын

    @@matthewcrispino did u find out what script and line?

  • @Eggowaffle.

    @Eggowaffle.

    3 ай бұрын

    @@minehutminehutcreations7938 what line in what script?

  • @Cottbuzz
    @Cottbuzz4 ай бұрын

    alvin

  • @Adrianblah
    @Adrianblah2 ай бұрын

    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

    @vemmello

    2 ай бұрын

    i have the same problem lol

  • @vemmello

    @vemmello

    2 ай бұрын

    Nvm i fix it

  • @Cottbuzz
    @Cottbuzz4 ай бұрын

    i cant join ur discord server

  • @LJPerms
    @LJPerms2 күн бұрын

    the things dont load?

  • @rady_meme1582
    @rady_meme15824 ай бұрын

    Scripts doesn’t starts… (dropper, conveyor) yeah…

  • @minehutminehutcreations7938

    @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

  • @JerseyAir
    @JerseyAir4 ай бұрын

    Hi

  • @demonguy6
    @demonguy64 ай бұрын

    thanks for the video but why doesnt the dropper work if you join again?

  • @dylzzmoments2486
    @dylzzmoments24864 ай бұрын

    epic video

  • @minehutminehutcreations7938
    @minehutminehutcreations79384 ай бұрын

    have you made any maps that i could play?

  • @ToeLuvr69420
    @ToeLuvr6942025 күн бұрын

    liked

  • @rady_meme1582
    @rady_meme15824 ай бұрын

    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

    @rady_meme1582

    4 ай бұрын

    Oh it was my problem bcs I write id and not Id

  • @bonky3054
    @bonky30544 ай бұрын

    🔙😊

  • @johnshedIetsky
    @johnshedIetsky4 ай бұрын

    This guys voice changed so much since the last time i watched his videos

  • @Foxie16713

    @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

  • @qw1dy
    @qw1dyАй бұрын

    when the player exits, the tycoon remains in the same place and does not disappear

  • @MariahLopez51202

    @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

    @coolcons1930

    13 күн бұрын

    @@MariahLopez51202 no don’t destroy the plot instead destroy the folders

  • @MostRandomGamer
    @MostRandomGamerАй бұрын

    I had to redo the tutorial just to redo this tutorial 😭 💀 🙏

  • @matthewcrispino
    @matthewcrispino4 ай бұрын

    Once the things load the droppers and conveyor DONT START

  • @the-lenny-dood7502
    @the-lenny-dood75024 ай бұрын

    would u have another time to revamp your 2020 and 2021 playlist scripting guides into 10 min 2024 scripting guides?

  • @dualspike
    @dualspike20 сағат бұрын

    uh the leaderstats gone missing edit: nevermind I fixed it I forgot to add player in PlayerAdded()

  • @CyrusTheVirus-sr4xu
    @CyrusTheVirus-sr4xu2 ай бұрын

    not saving my cash D:

  • @dominikkwiatkowski9321
    @dominikkwiatkowski93214 ай бұрын

    can someone drop me whole codes beacuse my chat gpt destroyed everything

  • @4rthurlmao
    @4rthurlmaoАй бұрын

    plugins now cost real money 💀

  • @Ostekongen28471
    @Ostekongen284714 ай бұрын

    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

  • @CT2507
    @CT25074 ай бұрын

    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

    @travelingbeast1

    3 ай бұрын

    You must of done something wrong then. All of the second video works

  • @CT2507

    @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.

  • @minhpham437
    @minhpham4374 ай бұрын

    What about Rebirth?

  • @impekachh
    @impekachh4 ай бұрын

    20 sec ago

  • @minehutminehutcreations7938

    @minehutminehutcreations7938

    4 ай бұрын

    yeah but i am a member so i was first little man

  • @impekachh

    @impekachh

    4 ай бұрын

    @@minehutminehutcreations7938 fuc

  • @CyrusTheVirus-sr4xu

    @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

  • @FCEdits2
    @FCEdits24 ай бұрын

    WAIT.. YOU'RE THE TPS COMMENTATOR

  • @chippyeditz

    @chippyeditz

    2 ай бұрын

    He is lol

  • @ToeLuvr69420
    @ToeLuvr6942025 күн бұрын

    😘

  • @Bartexz
    @Bartexz4 ай бұрын

    Can you make a free model of it?

  • @Mr_Mando.
    @Mr_Mando.4 ай бұрын

    Early people 👇

  • @minehutminehutcreations7938

    @minehutminehutcreations7938

    4 ай бұрын

    i was first lmao

  • @waydeclark
    @waydeclark4 ай бұрын

    mj

  • @TomoBakerinio
    @TomoBakerinio4 ай бұрын

    I wonder why you didn't upload for 7 months?

  • @itzyoboi_koyellowhere
    @itzyoboi_koyellowhere4 ай бұрын

    waaht

  • @minehutminehutcreations7938
    @minehutminehutcreations79384 ай бұрын

    it doesn't start the scripts tho ha ha

  • @rady_meme1582

    @rady_meme1582

    4 ай бұрын

    Yeah that’s true

  • @zoeilgatrblx6713

    @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!

  • @harryclarke9484
    @harryclarke94844 ай бұрын

    Alvin:pins Me:yeeaeaeaeae

  • @Zephyrr_tv
    @Zephyrr_tv14 күн бұрын

    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)

  • @jenniferserrano4738
    @jenniferserrano47383 ай бұрын

    Promo-SM 🤭