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
@Rafter1016 ай бұрын
Lol fr
@tomsterbg81306 ай бұрын
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).
@PoloDacControlMaster2 ай бұрын
47 lines not 15
@ErenPotter2 ай бұрын
@@PoloDacControlMaster 15 lines were the lines that saved data.
@miloquespace264210 ай бұрын
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
@AxajonOFFICIAL10 ай бұрын
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-kh7oc3 ай бұрын
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.
@abdelgoated9 ай бұрын
finally someone who EXPLAINS datastoring and not makes me copy their script
@dinfarmor9 ай бұрын
I watched videos for hours and didn't understand it but your 10 minute video was so simple and wall explained, thanks alot.
@Lucki_GuyYT2 ай бұрын
I love the way he explains every single detail!!! Tysm this really helped me for my game!!
@TheRealBl4k_7 ай бұрын
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
@SpyGlass610 Жыл бұрын
thank you i've recently been struggling on data store and now after a lot of practice, i can make it from scratch!
@iamLudius Жыл бұрын
That's great man! Keep up the good work and best of luck with your dev journey :]
@Avysilvasan11 ай бұрын
w, i want to achieve that level
@urnix6910 ай бұрын
I only have one thing to say: Thank you so much for explaining this, now I understand datastores.
@uptownfunkog7 ай бұрын
thank you sir. Talking in a manner which noobs like me can understand
@official_mosfet Жыл бұрын
Honestly i don't understand why people think data store as something nightmarish. On the start it was annoying. Now it's nothing.
@iamLudius Жыл бұрын
It actually gets so simple later on
@ruprecht69 Жыл бұрын
whats the hardest thing in roblox scripting to grasp?
@rakirat640 Жыл бұрын
@@iamLudiuscan you help me with datastore?
@jayjohnson23939 ай бұрын
@@ruprecht69probably mastering cframes since it requires deep mathimatical knowledge
@notactuality9 ай бұрын
@@ruprecht69probably oop once you grasp that you can pretty much do anything
@TheBigCrazyBird7 ай бұрын
thank you so so much dude. thsi is a underrated video. i didnt understand this but you explained it so well!!
@sidsays134010 ай бұрын
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.
@Champ_Him3 ай бұрын
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!
@Supaxzz7 ай бұрын
i like ur editing style great video i learned something from it
@henriquebigolin20068 ай бұрын
Thanks man, I didn't get the logical behind datasave, but now it works
@yyhhttcccyyhhttccc66949 ай бұрын
finally someone who explains the damn code
@Jacknoham2 ай бұрын
mine literally wont work no matter what. i've tried many scripts, the api thing is on, and i have many other games which the datastore works.
@Hayden69042oАй бұрын
for me the setaysnc isnt working
@Thomaaas078 ай бұрын
Really useful vid, I thought it was hard but it was actually easy, thx.
@Rafter1016 ай бұрын
this dude literally makes the best roblox guides on yt
@iamLudius6 ай бұрын
Aye thanks for the encouraging words bro, it really means a lot :] Also thanks for the comment
@Musicaestelar7 ай бұрын
You just gained one sub! Best video I watched about datastore!
@SlothOfTheSea7 ай бұрын
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.
@SlothOfTheSea7 ай бұрын
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.
@CodeByteCrafter6 ай бұрын
Thank you so much bro i was so confused abt data store and now it feels so simple
@Shop_Smart1stАй бұрын
bro i love you i was about to quit cus of this Datastore service but then i found your video tysm you are great
@Therealskibidirizzler2 ай бұрын
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
@Mochi-lf5rz3 ай бұрын
The issue is, the Data I wanna store is on a localscript, the normal script data was incredibly easy to store
@lunnarmoon6 ай бұрын
Wow, that's really easy. Thank you so much for the video!
@stephen50708 ай бұрын
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.
@уишразработчик7 ай бұрын
THANK YOU! ONLY YOUR DATA STORE WORKING!!!
@mathiashansen24245 ай бұрын
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
@MarkStillPlays7 ай бұрын
datastore viewer plugin goes hard
@sunzalea32577 ай бұрын
is it free
@iamLudius7 ай бұрын
Nope
@billybobjankens126 ай бұрын
you can just learn datastore without needing any plugin
@sunzalea32576 ай бұрын
@@billybobjankens12 i did that
@brianbhardwaj916521 күн бұрын
i learnt datastores pretty quick. the logic i had was this: whenever a player joins, check if they already have a sync with there user id. If there is, then set it to it. if not, then dont do anything and maybe give them a badge saying "welcome to this game". Then once a player leaves, create the sync between the user id of the player who is leaving, and the last data they had. I dont know how to add more than 1 value in the datastore but i'm guessing you just put everything in one big data list and store that? or the usage of a module script.
@G12DG12D-jy6ym4 күн бұрын
yeah that's what I'm thinking I got no idea
@refraysmusic6 ай бұрын
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.
@Th3_X03 ай бұрын
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..
@ad7786-x7lАй бұрын
In some games then you have like 20 things saved under the player, do you need to copy some parts 20 times then?
@matthewman17 ай бұрын
i have a script where every second the leaderstats value goes up i did the datastore part now it freezes at 0
@RyokuchaYT5 ай бұрын
THANK YOU LUDIUS!! I LOVE YOU!! 😭
@KaidoDeveloper Жыл бұрын
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 Жыл бұрын
I had never heard about this, but thanks for the heads up, I'll look into it :]
@Chlrintruc Жыл бұрын
200players in a server
@KaidoDeveloper Жыл бұрын
@@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 Жыл бұрын
@@KaidoDeveloper ok then I'll try to learn it.
@EzoPlayerS6 ай бұрын
@@KaidoDeveloperdoes BloxFruit use Profile Service?
@AndIWonderIf5 ай бұрын
The only time its gonna be hell is when you have a lot of things to store
@EggdogStudios15 күн бұрын
Also i would make a table that has players userids that are in the game and its equal to the data they have in game. Ao its session data, so if the data doesnt load and saves the data that didnt load then the data would get wiped. It just sees if the session data is equal or more than the stored data so if it is then it data stores
@AlexisAutotte2 ай бұрын
Datastores : MAN IT'S JUST TOO HARD ProfileServices: Am I a joke to you ??
@YourLocalBusinessMan19 ай бұрын
this guy is extremely underrated
@tricksen Жыл бұрын
bestt explanation
@iamLudius Жыл бұрын
I'm happy to hear that :]
@mathiashansen24245 ай бұрын
GetAsync is to check if the player is in the list and SetAsync is to set the players data
@noahlaird4 ай бұрын
I think I am just ass at coding in this, I followed everything and rechecked everything and it still doesn't save....
@Eldamian06 ай бұрын
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
@CsikosegerYT5 ай бұрын
Love you. Now i understand it. ❤
@darkarcher90810 ай бұрын
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
@AxajonOFFICIAL10 ай бұрын
bro can you please tell how we can do that properly?
@darkarcher90810 ай бұрын
@@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.
@ADarnSmore8 ай бұрын
@@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.
@CobraunieSC3 ай бұрын
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?
@Ender0663 ай бұрын
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?
@IndianParthGaming10 ай бұрын
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 Жыл бұрын
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 Жыл бұрын
but it says how to make it in the video!!
@rakirat640 Жыл бұрын
@@CyanNStuff it didnt work
@CyanNStuff Жыл бұрын
@@rakirat640 did you put the script in serverscriptservice?
@Robo4545611 ай бұрын
I’ll do it
@potolog10110 ай бұрын
@@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.
@Hayden69042oАй бұрын
The SetAsync doesnt work for me
@exituriam2 ай бұрын
i dont understand even though you explain it good , is this supposed to be for really new coding because im confused
@HorrorChef929Ай бұрын
I wouldn't think its supposed to be for beginners yet. Probably get to the point about learning PlayerAdded and PlayerRemoving and I'd say your good to go!
@genyaarikado17787 ай бұрын
but how do you save multiple values? that's where i get confused cause i have over 100 values
@Henrires6 ай бұрын
maybe try putting your values in a table and saving the table?
@SmalBlock5 ай бұрын
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.
@TheWorkerz4 ай бұрын
well, idk why but it always says: DataStore can't be accessed from client why???
@Arsen_fedotov2 ай бұрын
Because you can't save data on client
@chiseledcheese Жыл бұрын
"Datastore: A Sripter's Worst Nightmares Explained" Meanwhile: :GetAsync() and :SetAsync()
@iamLudius Жыл бұрын
Literally, it's that simple, people tend to overthink it jajajaja
@imthebestmayne12211 ай бұрын
@@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.
@urnix6910 ай бұрын
@@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.
@yoshissbkgod628510 ай бұрын
Just create a good module script It works as well
@imthebestmayne12210 ай бұрын
@@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.
@dogesenpai34697 ай бұрын
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 ?
@leonlav42 ай бұрын
I still don’t understand them after watching 4 tutorials 😭
@1440hz8 ай бұрын
i tried using this datastore script with a boolvalue, but it didn't work
@thegamingyuty5253 ай бұрын
question : HOW do i save Booleans?
@HitmanDevForPresident Жыл бұрын
a good day when ludius drops
@iamLudius Жыл бұрын
Damn, this really means a lot to me, I'm glad you enjoy my content. And also thanks for the comment :]
@HitmanDevForPresident Жыл бұрын
@@iamLudius hell yeah I even bought that scripting book cause of you to get better for my game as well
@JeLeff.5 ай бұрын
imagine how would it look like in c++
@4oreig8376 ай бұрын
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
@roboket35246 ай бұрын
a year is mad, you need to do your own research and get more specific with how luau works if its been that long
@4oreig8376 ай бұрын
@@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
@OhMyBucket10 ай бұрын
how can i make gui button that adds value to player datastore?
@OSFlames5 ай бұрын
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
@areuPlayer11 ай бұрын
Let's say there is two data. Coins and Levels. How can you save both?
@LanTriBlox11 ай бұрын
im pretty sure there is a more efficient way to do so then what im saying but just make 2 seperate datastores.
@iamLudius11 ай бұрын
U can do that or just save put them both in a table and just save it to one single player data datastore
@iamLudius11 ай бұрын
Put them both in a table before saving
@banditentertainment9178 ай бұрын
@@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?
@TetoIsSigma8 ай бұрын
I still dont get it😭
@Jxhsxn7 ай бұрын
then rewatch it until you do thats the only way of learning 🤷♂️
@TetoIsSigma7 ай бұрын
@@Jxhsxn Nah, I stole a script instead🤑
@CaspoPaster3 ай бұрын
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
@effkjveoaip7 ай бұрын
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?
@Antonio-vf2xj Жыл бұрын
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 Жыл бұрын
I've never really heard about Profile Service, but I'll take a look into it when I get the chance
@ErenPotter2 ай бұрын
@Antonio-vf2xj noo bro.. Believe in yourself. Dont give up yet. Everyone starts like this. Even the devs of blox fruits once struggled to make a simple killbrick. You can achieve anything through hardwork. Pls just dont give up game development. You definitely have what it takes. Developing is the future bro. You can achieve it. If theres a boulder in your way, crush it. If theres a missile in your way, destroy it. You can do it!
@unusedchannel92 ай бұрын
bro.. i finally understand it tysm
@tsaroftheunion4 ай бұрын
As a modeler, this was helpful.
@artlurg4318 ай бұрын
your games broken nothings getting saved
@BRXKENPROАй бұрын
your life broken you’re never getting rich
@sandproXDАй бұрын
someone copy n pasted..
@maciezez9 ай бұрын
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
@TratUsYT3 ай бұрын
1:10 “right? right? right? right? 😂
@gumlu_it3 ай бұрын
Thanks to you, I've figured out how it works
@уишразработчик7 ай бұрын
is it work with modules engines?
@vvjgee4g Жыл бұрын
Love your videos Ludius! I am looking for a scripter for a game I am working on. Would you be interested?
@iamLudius Жыл бұрын
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?
@The_BassWood_Who_Cried_Pancake4 ай бұрын
No matter how much I try this code isn't working
@The_BassWood_Who_Cried_Pancake4 ай бұрын
Nvm, fixed as soon as I posted this comment, I just put the playerRemoving function in the wrong order
@thetruenoobgod3 ай бұрын
honestly i just use chatgpt because i have no clue (but all other scripts are hand written dw)
@ErenPotterАй бұрын
hand written wtf
@mech23035 ай бұрын
woah, thank you so much.
@bobman48536 ай бұрын
i got everything to work now i just dont know how to give myself money in my own game
@Dimayuplay8 ай бұрын
Everyone gangsta til roblox datastores go down
@promagicbox7 ай бұрын
the start is sooo real
@HarshdeepCrafts2 ай бұрын
Oh tysm now i understood it 😭🙏🙏
@redash42399 ай бұрын
alll i hear the word is "right"
@DanScriptingRoblox25 күн бұрын
Eh i thought this tutorial is sth difficult… but well, easy to understand:)
@ShrekSoap2 ай бұрын
Bro you dont have to add that scary ghost im alone at my home dumbaz
@enrelyugi6 ай бұрын
Dude, you should talk about pcalls when talking about datastores, otherwise your viewers will have problems in their games
@Weirdcat6865 ай бұрын
real
@likmojasa5 ай бұрын
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
@spad6718 ай бұрын
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