Datastore: A Scripter's Worst Nightmare Explained

Поделиться
HTML-код
  • Опубликовано: 24 ноя 2024

Комментарии • 179

  • @legally4946
    @legally4946 7 месяцев назад +48

    i always used to think learning data stores for me was going to be a nightmare, this man proved me wrong in 15 lines of code

    • @Rafter101
      @Rafter101 4 месяца назад

      Lol fr

    • @tomsterbg8130
      @tomsterbg8130 4 месяца назад

      Plus I love DataStore2, a free tool gifted to the Roblox community by the Roblox community for even easier work with data stores as it caches data to ensure it isn't lost. The only problem in real games is how to decide when and what to load which can become very problematic if done wrong as memory leaks can occur (not cleaning up old data so new data is added over time and causes the server to degrade).

    • @PoloDacControlMaster
      @PoloDacControlMaster 12 дней назад

      47 lines not 15

  • @AxajonOFFICIAL
    @AxajonOFFICIAL 7 месяцев назад +6

    Thanks dude! You helped me overcome the hell of not understanding data stores. Can you also post a video explaining in more detail about data stores, such as what is pcall function and more?

    • @randomchannel-kh7oc
      @randomchannel-kh7oc Месяц назад +1

      to use pcall, do a variable that stores 2 variables at ones (no, not like this "local thing = {}" but like this "local success, errormessage") and then set those 2 variables to a pcall, and then put a function inside of it. if it errors, it sets success to false and errormessage to the error message. if not, it only sets success to true.

  • @miloquespace2642
    @miloquespace2642 8 месяцев назад +6

    thanks for keeping it simple and sticking to the point, every tutorial I watched was just people giving awful explanations, trying to explain pcalls and other code separate from datastore overloading my brain

  • @TheRealBl4k_
    @TheRealBl4k_ 5 месяцев назад +10

    God bless your soul dude, i had so much problm saving stuff in my games, now i can do it peacefully instead of punching random words in my keyboard until it does something

  • @dinfarmor
    @dinfarmor 7 месяцев назад +9

    I watched videos for hours and didn't understand it but your 10 minute video was so simple and wall explained, thanks alot.

  • @abdelgoated
    @abdelgoated 7 месяцев назад +8

    finally someone who EXPLAINS datastoring and not makes me copy their script

  • @urnix69
    @urnix69 8 месяцев назад +3

    I only have one thing to say:
    Thank you so much for explaining this, now I understand datastores.

  • @SpyGlass610
    @SpyGlass610 10 месяцев назад +10

    thank you i've recently been struggling on data store and now after a lot of practice, i can make it from scratch!

    • @iamLudius
      @iamLudius  10 месяцев назад +1

      That's great man! Keep up the good work and best of luck with your dev journey :]

    • @Avysilvasan
      @Avysilvasan 9 месяцев назад

      w, i want to achieve that level

  • @TheBigCrazyBird
    @TheBigCrazyBird 4 месяца назад +3

    thank you so so much dude. thsi is a underrated video. i didnt understand this but you explained it so well!!

  • @sidsays1340
    @sidsays1340 8 месяцев назад +3

    Hey nice video, you helped a lot, suggestion: Could you make a video like this with datastores but instead it is where you buy something from a shop and the thing you bought saves in your inventory after you die and/or leave the game.

  • @henriquebigolin2006
    @henriquebigolin2006 6 месяцев назад +3

    Thanks man, I didn't get the logical behind datasave, but now it works

  • @Champ_Him
    @Champ_Him Месяц назад

    This was a very informative video and easy to understand. I am creating a game solo from scratch without any experience in coding and building just for fun and I have to say of all the tutorials and information I have found to help me along the way this is by far the best one yet. I appreciate it!

  • @official_mosfet
    @official_mosfet 10 месяцев назад +42

    Honestly i don't understand why people think data store as something nightmarish. On the start it was annoying. Now it's nothing.

    • @iamLudius
      @iamLudius  10 месяцев назад +11

      It actually gets so simple later on

    • @ruprecht69
      @ruprecht69 10 месяцев назад

      whats the hardest thing in roblox scripting to grasp?

    • @rakirat640
      @rakirat640 10 месяцев назад

      ​@@iamLudiuscan you help me with datastore?

    • @jayjohnson2393
      @jayjohnson2393 7 месяцев назад

      @@ruprecht69probably mastering cframes since it requires deep mathimatical knowledge

    • @notactuality
      @notactuality 7 месяцев назад

      ​@@ruprecht69probably oop once you grasp that you can pretty much do anything

  • @uptownfunkog
    @uptownfunkog 5 месяцев назад +2

    thank you sir. Talking in a manner which noobs like me can understand

  • @Supaxzz
    @Supaxzz 5 месяцев назад +2

    i like ur editing style great video i learned something from it

  • @Thomaaas07
    @Thomaaas07 6 месяцев назад +1

    Really useful vid, I thought it was hard but it was actually easy, thx.

  • @SlothOfTheSea
    @SlothOfTheSea 5 месяцев назад +5

    DataStores gave me hell as a newer scripter, but I can handle them pretty well now - my preferred method is to loop through the player’s descendants, saving their stats as IntValues, NumValues etc., and identifying them by their name and parent if necessary. Nice tutorial by the way.

    • @SlothOfTheSea
      @SlothOfTheSea 5 месяцев назад +1

      I should add, though, that you should probably add a game:BindToClose(function() along with a wait() and your saving function to act as a catch-all, since Roblox Studio doesn’t always detect when you press the stop button.

  • @Therealskibidirizzler
    @Therealskibidirizzler 21 день назад

    thank you sooo much i wanted to learn more about datastores and i tought that if i followed this tutorial i would still make a lot of mistakes and bugs but i actually made it work

  • @stephen5070
    @stephen5070 6 месяцев назад +3

    I'm trying to make an Incremental game on Roblox, this should help me a lot!
    I'm new to scripting, I thought of Parent to Child relationship between Instances too literally.
    I thought the Parent container couldn't be the Parent of the other Parent's children.
    Now I understand you can search anything if you reference the correct String Value.

  • @yyhhttcccyyhhttccc6694
    @yyhhttcccyyhhttccc6694 7 месяцев назад +3

    finally someone who explains the damn code

  • @Musicaestelar
    @Musicaestelar 4 месяца назад

    You just gained one sub! Best video I watched about datastore!

  • @CodeByteCrafter
    @CodeByteCrafter 4 месяца назад

    Thank you so much bro i was so confused abt data store and now it feels so simple

  • @Rafter101
    @Rafter101 4 месяца назад +1

    this dude literally makes the best roblox guides on yt

    • @iamLudius
      @iamLudius  4 месяца назад

      Aye thanks for the encouraging words bro, it really means a lot :]
      Also thanks for the comment

  • @mathiashansen2424
    @mathiashansen2424 2 месяца назад

    Its amazing i can see my scripting has improved because 1 month ago i couldnt even undertsand anything of this and now i understand it

  • @lunnarmoon
    @lunnarmoon 4 месяца назад

    Wow, that's really easy. Thank you so much for the video!

  • @Mochi-lf5rz
    @Mochi-lf5rz 24 дня назад +1

    The issue is, the Data I wanna store is on a localscript, the normal script data was incredibly easy to store

  • @MarkStillPlays
    @MarkStillPlays 5 месяцев назад +4

    datastore viewer plugin goes hard

  • @AndIWonderIf
    @AndIWonderIf 2 месяца назад

    The only time its gonna be hell is when you have a lot of things to store

  • @mathiashansen2424
    @mathiashansen2424 2 месяца назад

    GetAsync is to check if the player is in the list and SetAsync is to set the players data

  • @ChristPoster
    @ChristPoster 10 месяцев назад +4

    I use profile service, because get and setAsync stops working after 200 players in your game in total. Profile Service is just a lot more reliable and it's great for server shut downs.

    • @iamLudius
      @iamLudius  10 месяцев назад +2

      I had never heard about this, but thanks for the heads up, I'll look into it :]

    • @Chlrintruc
      @Chlrintruc 10 месяцев назад

      200players in a server

    • @ChristPoster
      @ChristPoster 10 месяцев назад

      @@Chlrintruc Yeah, just read that. But It is still really inefficient to use when there are these adanced things out there (even bloxfruits uses it)

    • @Chlrintruc
      @Chlrintruc 10 месяцев назад

      @@ChristPoster ok then I'll try to learn it.

    • @EzoPlayerS
      @EzoPlayerS 4 месяца назад

      ​@@ChristPosterdoes BloxFruit use Profile Service?

  • @Antonio-vf2xj
    @Antonio-vf2xj 10 месяцев назад +4

    personally i use profileservice and it works great, finally i managed to master even this lol, even though i guess ima abandon game development, somehow it doesnt fit me, and probably its just fact i always got no game ideas to make, and i work alone ):

    • @iamLudius
      @iamLudius  10 месяцев назад +2

      I've never really heard about Profile Service, but I'll take a look into it when I get the chance

  • @chiseledcheese
    @chiseledcheese 10 месяцев назад +4

    "Datastore: A Sripter's Worst Nightmares Explained"
    Meanwhile:
    :GetAsync() and :SetAsync()

    • @iamLudius
      @iamLudius  10 месяцев назад +1

      Literally, it's that simple, people tend to overthink it jajajaja

    • @imthebestmayne122
      @imthebestmayne122 9 месяцев назад

      @@iamLudius Eh, it's really not that simple. Maybe if you are just using a simple cash system, and that is the only key you need to store. I would say the way you described it is DataStores at their simplest form. They can get much more complex.

    • @urnix69
      @urnix69 8 месяцев назад

      @@imthebestmayne122 Ludius explained it in a simple way so that datastores are more approachable. Once you understand the fundamentals of datastores, that means the more "complicated" datastores aren't as complicated as they seem.

    • @yoshissbkgod6285
      @yoshissbkgod6285 7 месяцев назад

      Just create a good module script
      It works as well

    • @imthebestmayne122
      @imthebestmayne122 7 месяцев назад

      @@urnix69 gotta say I disagree with this. No disrespect either to you or the poster. Most of this information (and more) can just be read from the data store api page on the roblox documentation page. What is much harder is finding information about more complicated data stores. Look at somethibt like ProfileService or DataStores2. I guess this video helps understand it at a very rudimentary level, but nothing further than that.

  • @TratUsYT
    @TratUsYT 29 дней назад +1

    1:10
    “right? right? right? right? 😂

  • @darkarcher908
    @darkarcher908 8 месяцев назад +1

    guys heres an advice from me:
    dont make datastores saving only on leaving! Make it save every time coins change instead, because if its only when you leave, if you can drop coins in your game then you can make a dupe glitch on private servers
    basically player1 drops 5 coins to player2, player2 leaves and the 5 coins save, but player1 SHUTS DOWN his private server so the data doesnt save, so he has 5 coins again

    • @AxajonOFFICIAL
      @AxajonOFFICIAL 7 месяцев назад

      bro can you please tell how we can do that properly?

    • @darkarcher908
      @darkarcher908 7 месяцев назад

      @@AxajonOFFICIALits so simple, if you have an inventory system or currency just make it save every time it gets changed, like make a new function that runs whenever the value changes and when it does it sets your async and updates.

    • @ADarnSmore
      @ADarnSmore 6 месяцев назад +1

      @@darkarcher908 saving player data everytime a value changes sound like a performance nightmare in any game with fast changing values and a decent amount of players.

  • @Smal_Block
    @Smal_Block 3 месяца назад

    They should make it so you could erase everything on game's datastore.
    Also I have been suffering trying to make a datastore thing, it really depends what you're trying to code.

  • @уишразработчик
    @уишразработчик 5 месяцев назад +1

    THANK YOU! ONLY YOUR DATA STORE WORKING!!!

  • @YourLocalBusinessMan1
    @YourLocalBusinessMan1 7 месяцев назад +1

    this guy is extremely underrated

  • @RyokuchaYT
    @RyokuchaYT 2 месяца назад

    THANK YOU LUDIUS!! I LOVE YOU!! 😭

  • @tsaroftheunion
    @tsaroftheunion Месяц назад

    As a modeler, this was helpful.

  • @Th3_X0
    @Th3_X0 Месяц назад

    I need a little bit of help to know if I understand it right. So for me to save data for each player, I would need to make a server script in which I would need to reference every script that is responsible for some kind of system logic in my game. For example, if I have scripts for inventory, currency, leaderboard, et cetera, I would need to first connect those scripts to server script that I will be using for a DataStore and make a table with those scripts inside my server script for DataStore. In simple words, I need to add every script that has to do something with things that need to be saved across sessions and places inside my game to one script that will save those data automatically for me as players join or leave the game..

  • @CsikosegerYT
    @CsikosegerYT 3 месяца назад

    Love you. Now i understand it. ❤

  • @leonlav4
    @leonlav4 6 дней назад

    I still don’t understand them after watching 4 tutorials 😭

  • @JeLeff.
    @JeLeff. 2 месяца назад

    imagine how would it look like in c++

  • @gumlu_it
    @gumlu_it Месяц назад

    Thanks to you, I've figured out how it works

  • @effkjveoaip
    @effkjveoaip 5 месяцев назад

    Datastores is just a pain and very repetitve to do because of failsaving and the log way to get data and trying to get every single data.. Who agrees?

  • @HitmanDevForPresident
    @HitmanDevForPresident 10 месяцев назад +2

    a good day when ludius drops

    • @iamLudius
      @iamLudius  10 месяцев назад +1

      Damn, this really means a lot to me, I'm glad you enjoy my content. And also thanks for the comment :]

    • @HitmanDevForPresident
      @HitmanDevForPresident 10 месяцев назад

      @@iamLudius hell yeah I even bought that scripting book cause of you to get better for my game as well

  • @dogesenpai3469
    @dogesenpai3469 5 месяцев назад

    Very good explanation, but I have 1 question. In this video you made a DataStore for coins, but I have more values to store, lets say for example Stamina, Strength or whatever it is, do I create a DataStore for each data ?

  • @tricksen
    @tricksen 10 месяцев назад +5

    bestt explanation

    • @iamLudius
      @iamLudius  10 месяцев назад +1

      I'm happy to hear that :]

  • @IndianParthGaming
    @IndianParthGaming 8 месяцев назад +1

    I like your detailed explanation an i tried it in my obby game but it is not working can you please make a video on it? please

  • @artlurg431
    @artlurg431 6 месяцев назад +13

    your games broken nothings getting saved

  • @unusedchannel9
    @unusedchannel9 22 дня назад

    bro.. i finally understand it tysm

  • @Dimayuplay
    @Dimayuplay 6 месяцев назад

    Everyone gangsta til roblox datastores go down

  • @Ender066
    @Ender066 Месяц назад

    Hey man, I don't know if you'll ever read this, but I have a question about data stores. So like, I got a message from Roblox saying that someone requested for their data to be removed from my game, but I never used this data store thingy, so do you know by any chance if it was any error from Roblox or something?

  • @maciezez
    @maciezez 7 месяцев назад +1

    tbh for me data store wasn't and isn't my worst nightmare cause 1st place for worst nightmare takes math and object oriented programming

  • @exituriam
    @exituriam 23 дня назад

    i dont understand even though you explain it good , is this supposed to be for really new coding because im confused

  • @Eldamian0
    @Eldamian0 4 месяца назад

    Should we really use SetAsync for a system like that? Isn't it better to use UpdateAsync? I don't really understand what's the point of UpdateAsync compared to SetAsync

  • @noahlaird
    @noahlaird 2 месяца назад

    I think I am just ass at coding in this, I followed everything and rechecked everything and it still doesn't save....

  • @thetruenoobgod
    @thetruenoobgod Месяц назад

    honestly i just use chatgpt because i have no clue
    (but all other scripts are hand written dw)

  • @OSFlames
    @OSFlames 3 месяца назад

    Tho the script u described wasn’t a really good script because if there’s an error the player won’t get the data at all which is bad

  • @CobraunieSC
    @CobraunieSC Месяц назад

    It's all fun and games until you try to datastore a custom item with 7+ values + a lot of other similar items, do you just write the same line of codes a quadrillion times?

  • @matthewman1
    @matthewman1 5 месяцев назад

    i have a script where every second the leaderstats value goes up i did the datastore part now it freezes at 0

  • @mech2303
    @mech2303 3 месяца назад

    woah, thank you so much.

  • @HarshdeepCrafts
    @HarshdeepCrafts 23 дня назад

    Oh tysm now i understood it 😭🙏🙏

  • @vvjgee4g
    @vvjgee4g 10 месяцев назад +1

    Love your videos Ludius! I am looking for a scripter for a game I am working on. Would you be interested?

    • @iamLudius
      @iamLudius  10 месяцев назад

      As much as I'd like to help you and any other person that may need me, at the moment my schedule's packed, sorry man :[
      But maybe I can help you through the dev calls inside the discord server?

  • @promagicbox
    @promagicbox 5 месяцев назад

    the start is sooo real

  • @CaspoPaster
    @CaspoPaster Месяц назад

    I want to do it in my poop simulator im think ing of using text label when u click the poop button u get 1+ poop

  • @rakirat640
    @rakirat640 10 месяцев назад +2

    ill pay 50 robux who will do working DataStore script (i have 3 values)
    i checked the 3 tutorials and all of these tutotials doesn't work
    (ChatGPT also didn't help me)

    • @CyanNStuff
      @CyanNStuff 9 месяцев назад

      but it says how to make it in the video!!

    • @rakirat640
      @rakirat640 9 месяцев назад

      @@CyanNStuff it didnt work

    • @CyanNStuff
      @CyanNStuff 9 месяцев назад

      @@rakirat640 did you put the script in serverscriptservice?

    • @Robo45456
      @Robo45456 9 месяцев назад

      I’ll do it

    • @potolog101
      @potolog101 7 месяцев назад

      @@rakirat640 the video EXPLAINS it in an approcheable way.
      basically i had NO IDEA how datastore works, but after watching this video which showed examples of using numbers, i used my brain to think of the other ways i could use datastore based on the knowledge i had.

  • @bobman4853
    @bobman4853 4 месяца назад

    i got everything to work now i just dont know how to give myself money in my own game

  • @thegamingyuty525
    @thegamingyuty525 Месяц назад

    question : HOW do i save Booleans?

  • @l_egac_y
    @l_egac_y 6 месяцев назад

    Bro wth every other video i saw on this was 30 mins and didn't work and this was 10 mins and it worked first try! Thank you so much!!! one problem that i have is that i dont know how to make multiple datas save
    Edit learned how to do it it was so easy! Just looked at a little bit of the documentations

  • @4oreig837
    @4oreig837 4 месяца назад

    is there something im missing? because ive been trying to get datastore working for a year now but nothing i do seems to work, i enabled studio to api, followed everything in the video but doesn't work

    • @roboket3524
      @roboket3524 4 месяца назад

      a year is mad, you need to do your own research and get more specific with how luau works if its been that long

    • @4oreig837
      @4oreig837 4 месяца назад

      @@roboket3524 its not exactly a year its just been on and off for the most part but ive been trying for a week and still can't figure it out

  • @SpidermanFromTemu
    @SpidermanFromTemu Месяц назад

    BRO I SWEAR IM DAMN MAD CUZ MY DATASTORE LITERALLY STOPS WORKING,AND I TRY TO FIX IT,1 HOUR LATER AND IT DIDNT WORK,I SWEAR ROBLOX IS DEAD 😡😡

  • @TheWorkerz
    @TheWorkerz 2 месяца назад

    well, idk why but it always says: DataStore can't be accessed from client why???

    • @Arsen_fedotov
      @Arsen_fedotov 7 дней назад

      Because you can't save data on client

  • @refraysmusic
    @refraysmusic 3 месяца назад +1

    So much wrong with this video. You don't prepare in the event that a read/write fails. DataStores are scary because of the amount of edge cases.

  • @genyaarikado1778
    @genyaarikado1778 5 месяцев назад

    but how do you save multiple values? that's where i get confused cause i have over 100 values

    • @Henrires
      @Henrires 4 месяца назад

      maybe try putting your values in a table and saving the table?

  • @OhMyBucket
    @OhMyBucket 8 месяцев назад

    how can i make gui button that adds value to player datastore?

  • @areuPlayer
    @areuPlayer 9 месяцев назад +1

    Let's say there is two data. Coins and Levels. How can you save both?

    • @LanTriBlox
      @LanTriBlox 9 месяцев назад +1

      im pretty sure there is a more efficient way to do so then what im saying but just make 2 seperate datastores.

    • @iamLudius
      @iamLudius  8 месяцев назад

      U can do that or just save put them both in a table and just save it to one single player data datastore

    • @iamLudius
      @iamLudius  8 месяцев назад +1

      Put them both in a table before saving

    • @banditentertainment917
      @banditentertainment917 6 месяцев назад

      @@iamLudius How so? Would it be like: You declare a table like "playerData = {}" and then you would use table.insert(table, value) in the player connect function? Then call that table when the player leaves?

  • @1440hz
    @1440hz 6 месяцев назад

    i tried using this datastore script with a boolvalue, but it didn't work

  • @уишразработчик
    @уишразработчик 5 месяцев назад

    is it work with modules engines?

  • @redash4239
    @redash4239 6 месяцев назад

    alll i hear the word is "right"

  • @CollyIsEpic
    @CollyIsEpic 6 месяцев назад +1

    I still dont get it😭

    • @Jxhsxn
      @Jxhsxn 5 месяцев назад +1

      then rewatch it until you do thats the only way of learning 🤷‍♂️

    • @CollyIsEpic
      @CollyIsEpic 5 месяцев назад

      @@Jxhsxn Nah, I stole a script instead🤑

  • @enrelyugi
    @enrelyugi 4 месяца назад

    Dude, you should talk about pcalls when talking about datastores, otherwise your viewers will have problems in their games

  • @The_BassWood_Who_Cried_Pancake
    @The_BassWood_Who_Cried_Pancake Месяц назад

    No matter how much I try this code isn't working

    • @The_BassWood_Who_Cried_Pancake
      @The_BassWood_Who_Cried_Pancake Месяц назад

      Nvm, fixed as soon as I posted this comment, I just put the playerRemoving function in the wrong order

  • @user-om4fe9yx1c
    @user-om4fe9yx1c 6 месяцев назад

    stopped watching at "wait(1)"

  • @OSFlames
    @OSFlames 3 месяца назад

    Agreed

  • @the_chosen_one1235
    @the_chosen_one1235 8 месяцев назад +1

    rookie

  • @funnyperson3636
    @funnyperson3636 10 месяцев назад +1

    type stuff

    • @iamLudius
      @iamLudius  10 месяцев назад

      That's wassup

  • @OniEye
    @OniEye 7 месяцев назад

    i love datastores and hate anim and shi lol

  • @TheCoolNooob
    @TheCoolNooob 23 дня назад

    I can relate

  • @FnafInsecte
    @FnafInsecte 4 месяца назад

    Real

  • @Avysilvasan
    @Avysilvasan 9 месяцев назад

    w vid

  • @blueeple
    @blueeple 6 месяцев назад

    This is way too easy 💀

  • @f4sf4
    @f4sf4 6 месяцев назад

    you should speak slower, i needed to put the video on speed 0.75

  • @likmojasa
    @likmojasa 3 месяца назад

    i still dont get it, way too complicated, and half of your code i had to ask AI to help me fix it, and at the end it still doesnt work for me

  • @petraral8868
    @petraral8868 10 месяцев назад +1

    kjk

    • @iamLudius
      @iamLudius  10 месяцев назад

      You always boosting your algorithm with your comments jajaajaja
      I appreciate it :]

    • @ropemox5550
      @ropemox5550 10 месяцев назад

      kjk@@iamLudius

  • @idkwhattosay4000
    @idkwhattosay4000 5 месяцев назад

    dude you talk so fast i dont understand nothing but good try

  • @fariss.m
    @fariss.m 10 месяцев назад +1

    SECOND

    • @iamLudius
      @iamLudius  10 месяцев назад

      That's wassup!

  • @RealAimYT
    @RealAimYT 10 месяцев назад +1

    FIRST

    • @iamLudius
      @iamLudius  10 месяцев назад +1

      That's what I'm talking about!

    • @RealAimYT
      @RealAimYT 10 месяцев назад

      @@iamLudius yessir