Datastore: A Scripter's Worst Nightmare Explained

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

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

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

    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 2 месяца назад

      Lol fr

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

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

  • @user-lt2dc9eg8m
    @user-lt2dc9eg8m 4 месяца назад +9

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

  • @TheRealBl4k_
    @TheRealBl4k_ 2 месяца назад +8

    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

  • @official_mosfet
    @official_mosfet 8 месяцев назад +36

    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  8 месяцев назад +10

      It actually gets so simple later on

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

      whats the hardest thing in roblox scripting to grasp?

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

      ​@@iamLudiuscan you help me with datastore?

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

      @@nallejansson4329probably mastering cframes since it requires deep mathimatical knowledge

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

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

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

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

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

    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

  • @SlothOfTheSea
    @SlothOfTheSea 2 месяца назад +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 2 месяца назад +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.

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

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

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

    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  8 месяцев назад +1

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

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

      w, i want to achieve that level

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

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

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

    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?

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

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

  • @sidsays1340
    @sidsays1340 5 месяцев назад +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.

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

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

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

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

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

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

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

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

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

    bro I can say this is the best tutorial ever ive seen from 25 videos, u explain it + u explain very good. tysm bro

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

    finally someone who explains the damn code

  • @stephen5070
    @stephen5070 3 месяца назад +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.

  • @mathiashansen2424
    @mathiashansen2424 13 дней назад

    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

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

    this dude literally makes the best roblox guides on yt

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

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

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

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

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

    THANK YOU! ONLY YOUR DATA STORE WORKING!!!

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

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

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

    datastore viewer plugin goes hard

  • @RyokuchaYT
    @RyokuchaYT 14 дней назад

    THANK YOU LUDIUS!! I LOVE YOU!! 😭

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

    Love you. Now i understand it. ❤

  • @AndIWonderIf
    @AndIWonderIf 16 дней назад

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

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

    this guy is extremely underrated

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

    bestt explanation

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

      I'm happy to hear that :]

  • @mathiashansen2424
    @mathiashansen2424 13 дней назад

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

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

    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 ?

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

    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.

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

    woah, thank you so much.

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

    your games broken nothings getting saved

  • @darkarcher908
    @darkarcher908 5 месяцев назад +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 5 месяцев назад

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

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

      @@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 3 месяца назад +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.

  • @PiecePoster
    @PiecePoster 8 месяцев назад +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  8 месяцев назад +2

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

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

      200players in a server

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

      @@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 7 месяцев назад

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

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

      ​@@PiecePosterdoes BloxFruit use Profile Service?

  • @Antonio-vf2xj
    @Antonio-vf2xj 8 месяцев назад +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  8 месяцев назад +2

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

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

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

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

    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

  • @JeLeff.
    @JeLeff. 16 дней назад

    imagine how would it look like in c++

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

    the start is sooo real

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

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

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

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

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

      @@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 5 месяцев назад

      @@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 5 месяцев назад

      Just create a good module script
      It works as well

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

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

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

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

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

    a good day when ludius drops

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

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

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

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

  • @OSFlames
    @OSFlames 29 дней назад

    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

  • @IndianParthGaming
    @IndianParthGaming 5 месяцев назад +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

  • @rakirat640
    @rakirat640 7 месяцев назад +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 7 месяцев назад

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

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

      @@CyanNStuff it didnt work

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

      @@rakirat640 did you put the script in serverscriptservice?

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

      I’ll do it

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

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

  • @maciezez
    @maciezez 5 месяцев назад +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

  • @user-yw6ht7vh6j
    @user-yw6ht7vh6j 3 месяца назад

    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?

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

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

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

      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?

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

    Everyone gangsta til roblox datastores go down

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

    is it work with modules engines?

  • @OSFlames
    @OSFlames 29 дней назад

    Agreed

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

    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

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

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

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

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

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

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

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

    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.

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

    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 Месяц назад

      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 Месяц назад

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

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

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

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

    Real

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

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

    • @LanTriBlox
      @LanTriBlox 7 месяцев назад +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  6 месяцев назад

      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  6 месяцев назад +1

      Put them both in a table before saving

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

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

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

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

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

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

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

    I still dont get it😭

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

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

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

      @@Jxhsxn Nah, I stole a script instead🤑

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

    alll i hear the word is "right"

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

    stopped watching at "wait(1)"

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

    is datastore support JSON?

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

      No idea what JSON means, sounds familiar tho

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

      Yes if you put the json data in a table first by using HttpsService:JSONDecode() you can save it

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

      @@iamLudius Javascript Object Notation is a storage in website which converts all the tables into string!

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

      it's like a datastore you can save your data just like JSON

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

    w vid

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

    rookie

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

    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

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

    This is way too easy 💀

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

    type stuff

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

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

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

    i love datastores and hate anim and shi lol

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

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

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

    SECOND

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

      That's wassup!

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

    FIRST

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

      That's what I'm talking about!

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

      @@iamLudius yessir

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

    kjk

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

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

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

      kjk@@iamLudius