Save Player Data with Roblox Datastores
DATASTORE EDITOR ► devforum.roblox.com/t/datasto...
MERCH ► shop.gnome.codes/
DISCORD ► / discord
TWITCH ► / gnomecode
TWITTER ► / gnomecoderblx
WEBSITE ► gnome.codes/
TIMESTAMPS ►
00:00 Intro
00:15 What is Datastore
01:27 Saving data
07:45 Loading data
12:26 Enabling API Services
14:00 Combining Leaderstats and Table data
15:43 Testing
16:16 Editing Datastores
16:58 Handling Server Shutdown
20:40 Outro
Пікірлер: 580
I hope you had a wonderful Christmas with your family. Nice to see you still pushing out videos.
I was never good with how to use tables so this helped a ton, thank you.
GnomeCode is awesome. He makes actually good videos and explains almost everything. Keep it up GnomeCode!
I was gonna bash on the gnome but this is pretty well-engineered. Wish i had you when i was learning how to code on Lua.
i was about to add datastores and then i got the notification about a gnomecode video
thank you gnomecode for making awesome tutorials and inspiring tons of great games!
Thank you sir, never seen before the repeat until implementation
working on a new game and stuff like thisll really help. thanks, gnome!
great video as ever! One small point. I would save the Player.UserId to a variable when saving or you wont be able to use it if the first attempt fails as the player object will be gone by then. also, not too big a problem, but with normal datastores there is a limit of 1 read/write per 6 seconds to the same key
@GnomeCode
Жыл бұрын
Excellent points, thanks griffo
@GalaxyedRainbow
Жыл бұрын
@@GnomeCode your cool i like you
@CatgamerX
Жыл бұрын
@@GnomeCode Can you make more doors?
@onewill8905
6 ай бұрын
Oh yeah for sure.. Everybody if you are reading this and feel a little lazy to do it, I promise its worth please follow his advice. It saved me. This is my script if you are confused on how to do it : local function plrLeaving(plr) if sessionData[plr.UserId] then local success = nil local errorMsg = nil local attempt = 1 repeat success, errorMsg = pcall(function() local plrUserId = plr.UserId database:SetAsync(plrUserId, sessionData[plr.UserId]) end) attempt += 1 if not success then warn(errorMsg) task.wait(3) end until success or attempt == 5 if success then print("Data saved for:",plr.Name) else warn("Unable to save for:",plr.Name) end end end
@Prillanator
6 ай бұрын
@@onewill8905 Please help, I get an error message "DataStoreService: ValueNotAllowed: Dictionary is not allowed in data stores. API: SetAsync, Data Store: PlacementBoards" Just before that line I print sessionData[player.UserId] which prints { ["Placement"] = -1 } I understand that its a Dictionary but I followed the code to a T. cant find where I made the error as to my understanding sessionData[player.UserId] = playerData and playerData = {["Placement"] = -1,}
I love your content man i learn a lot
All the other videos I've watched show you how to do it but don't teach you so thank you gnomecode
Thanks gnome for always doing tutorials on things we all know other roblox how to creators can never do due to their laziness
@TheOfficialPWP
Жыл бұрын
on god
@baconheadhair6938
2 ай бұрын
??
yes the plugin edit video sounds great too :)
Great Video! I learnt a lot from this channel
i did have to get some help for more leaderstats but your a lifesaver i spent hours on trying before hand thanks
@UnfortunateKera
7 ай бұрын
Bro can you help me?
This is something i've been looking for for aaagggeeess. you explained it perfectly. I have an idea for a tutorial. how about how to make a capture point system used in Domination gamemodes? i havent seen any videos on how to do that. i thought you would use Region3 but couldn't get much further as I am a beginner at coding. this would help me out a ton. thanks for the great video
@autisticbluesloth5244
11 ай бұрын
every tenth of a second while a player is within 10 studs of a capture point you could update capture progress by an amount and do other visual rigamaro
@autisticbluesloth5244
11 ай бұрын
to get wether or not a player is a certain distance you do (CapturePoint.Position - Character.Position).magnitude
Best lua teacher!, A very calming voice too, Not a screechy 9 yr old, ty
This was a great video to help make Datastores clear whilst waiting for Doors part 8. Also for Doors part 8 you should make the other place where everyone joins so you can go into a match with your friends and nobody else
@avgVar
Жыл бұрын
He already did that with lobby elevator video
@GreatRamilYT
Жыл бұрын
we even not added ambush, dark rooms and more... and you already want to take a step towards multiplayer?
@KoalaOnYT_
Жыл бұрын
@@GreatRamilYT it can already be multiplayer me and my pals have been playing through my version lol
@KoalaOnYT_
Жыл бұрын
@@GreatRamilYT plus we have all the bases we need to recreate the game
@GreatRamilYT
Жыл бұрын
@@KoalaOnYT_ for now we have to finish some more banal things, but for now you can use the vip server or find a tutorial on how to make multiplayer
These are so clutch tysm
Great Video! Was Helpfull for me that dosent understand DataStores.
i dont know if i should feel insulted or honored when he calls me a gnome..
Thank you so much for these tutorials! I honestly wouldn't know what to do with them. Btw, How do I make the Animate2 script compatible with scripts that load other animations?
You are helping so much! Liked and followed you!
Bro this is insane
yay, now I can Save Player Data with Roblox Datastores. jokes aside, this is an interesting take to see how to implement datastores with a more elaborate attempt
This will be helpful and also I bought some of your merch
Thanks for the awesome tutorila!
Yessir i needed this
Hi gnomecode! Just asking if you could maybe make a tutorial of how to make a stealth/action FPS game like Entry Point! Its a fun concept and idea! where you can either sneak around to clear your main objective(s) or go full loud with shootie shooties and take out infinite waves of enemies while you clear or complete you objectives(s) with also saving levels and characters maybe?
This is gonna be useful in my next game since its a long game!
Can we all agree GnomeCode is the best roblox lua teacher on youtube!! 😊
@ummmyah
Жыл бұрын
Oh most definitely
@Giuyo
Жыл бұрын
yes it's an awesome thing.
@BasedOnBrian
Жыл бұрын
Better than TheDevKing
@TheOfficialPWP
Жыл бұрын
yea the others are unhelpful
@wolf9903
Жыл бұрын
definetly last time i did a tutorial from TheDevKing it didnt even work
I remember four years ago I was watching your scripting tuts. Now when I look at your profile you have nearly half a bil visits man. Ur the goat
I love all the games u make ! Teddy is my favourite!
Hey GnomeCode, Love Your Content And Tutorials, i Was Wondering Could You Make A "How To Make A Game Like Roblox town" Series? I Would Love To Watch, Cheers!
i made a datastore but one of the variables doesn't work, when it changes, it doesn't fire the "changed" function
Bro, u are the best teacher! I like to watching u. Sorry for my English 😅
you earned ez subscribe, bro
so helpful!
amazing tutorial !
such a helpful tutorial
Thank you, this really good working
You should make a tutorial on how to add collectable gold into the Doors Tutorial series, I'd love to see it!
what a coincidence, I was just looking for videos about datastore
thank you bro
Question, in the beginning when setting the local variable for database “data” - how is this database created initially? Does simply setting a variable connecting to the service with a string name create it as well or just query/update it?
are you going to continue your doors series? if so, can it be about the guiding light death messages? y'know the blue texts that tell you who you died to and how to survive it next time
OH IT WORKED TYSM
Hey GnomeCode, I was making a cart ride game, but classic carts like you see in cart ride into Rdite for example are a bit too boring for me... I've seen alot of games with very interesting carts like in "Cart ride around nothing" or "Cart Ride Delivery Service", can you make a tutorial about those and how to make them? thanks!
Out of the many KZreadrs that I've watched to learn Roblox scripting, you GnomeCode have taken 1st place. I appreciate you not skipping over or poorly explaining even the smallest of details that may be crucial for a beginner to understand. Thank you for the great video.
@GamingDude467
5 ай бұрын
YES
@TT_and_CuzT
5 ай бұрын
I agree GnomeCode is #1
@BrightDay-tb8jj
4 ай бұрын
gnomecode you are da goat when i am a millionaire roblox-developer you can have 1 dollar
@BrightDay-tb8jj
4 ай бұрын
btw ur website is blocked for some reason :(
nice! at the first half its completely fine and fully working. but at the combining leaderstats it got messed up and idk the problem even though i checked it like 5 times and i still could find the problem to fix why it cant save my data. pretty nice!
Could you continue the Tower Defense Series for some additional towers (example: farms, commander, dj, vehicle support tower, barracks like in tower battles). If you do, then do it when you have time to do that. That's all.
@KhalidBro
10 ай бұрын
create it urself. he cant help u with everything
currently, i could never write this, but i can actually understand it. you explain very well. is this all there is to a datastore? still puzzling over how profileservice seems like an infinitely complex version of this
great video
New series! "How to make a game like entry point" rn.
a good lesson, but it would be nice to look at old materials
Hello GnomeCode! I’ve been someone who’s been watching your tutorials for a long time, and they’ve really helped me out! I’ve just been wondering, I think it would be pretty cool if you could show us how to make an rpg kind of game. It could get some views….
Could you please consider doing a video on Ordered Data Stores?
epico ty for saving my life
I said im gonna look up datastores and this video notif poped up Gnome did you put cameras in my room!??! /j
Cool video but why you don’t upload about teddy anymore?
hey gnomecode, could you please make a video about remote functions (you made on remote events only), i don't think you made one and I think it might help many people
@doinic09
Жыл бұрын
Well basically the only difference is with remote functions you can send information back to whatever is sending the function, so the client can send something to the server and the server can send something back based on the information the client sends. With remote events the sender can send information, but it can't receive information back.
I am interested in a standalone for editing datastores! Please gnomecode!!! Love your content btw!
hey gnome code! i have a question. I saw your Custom Charecters Video and i was thinking if you could make the custom character apply only to one team. Thanks!
Could you help with the footstep video? Nothing works when I do it all, not even the walking animation you made
How would I add more values, though?
That's great and all but how do you store a list of values that I can table.Insert() more values into?
Hey GnomeCode! I know it has been a month, and I don't know if anybody had asked this, but are you able to make a Murder Mystery type series?
@Foxie16713
Жыл бұрын
Teddy series
@twizzitch3127
Жыл бұрын
@@Foxie16713 that's more Piggy like than MM
Is there a way to use this to save the players clothing when they leave the game? Such as if they customised their character while in the game and then upon leaving it saved their clothes and accessories and all that, then when they rejoined it loaded all their clothes back on?
I have an I for a new tutorial series it should be about the Roblox game Bigfoot by black spruce studio or you could do a monster island game if it's possible
hes most likely on a hiatus on youtube, hes still active on roblox so dont worry.
AWESOME
gnomeode, great vid, but i'm using the datastore for a clicker simulator but the clicks aren't saving it's adding them to the leaderboard but when i go back in the clicks are back at what they were, there's no errors or warnings please help
Hey GnomeCode, could you make a video with my suggestion? It's because i'm making a roblox horror game. There is a monster that will teleport around the map with 1 minute wait time, and when you look at it, it will pop up in your screen, play a sound and fade away.(I'm still a begginer in roblox studio, thats why i ask talented people like you!)
Hey GnomeCode did you stop the Doors Tutorials Series?🤔 I am waiting for the next part...
Can u make a tutorial on RunService bc I get confused all the time
Can you do a tutorial on how to make a game like the mimic? You may have heard of it but if you can much appreciated!
Hey i watching you since this channel 12k Please can you contuine the doors tutorial? Like: Seek, figure, objects, animations, Lobby. Maybe some people can do the other thing i can too but i cant make the seek ai and chase sceen same as tools to like lighters spawning in closets. I know you will do what you fans want. You are best.
Very cool video
GnomeCode i have something to ask you, can you make a game like steep steps, i really wanted a tutorial series for it..
why does the console say: Argument 1 missing or nil
Hi, so in my games you unlock 5 different Billboard guis called “accolades” and I was wondering how I’d tweak this script to save those unlocked guis.
Could you make a vid on how you make the mape choice like in tower heroes. That you have to make a server to choose a map
TOO... MUCH... TO... MEMORIZE...
Can you make a series of how to make a steep steps game..
can you make a tutorial on a button masher with a camera for a keyboard key and if you win you live but if you fail you die kind of like the end of the doors seek chase kind of like that Doors X Fortnite (Collision Button Mash) if you can thank you!
great video butt I have a problem with it Im trying to fire a remote event when player buyes something and finding stuff that player bought in session data table and giving it +1 I tried table.find output nil print(table.find(SessionData[plr.UserId], eventInvWho)) -- this is the code I tried I tried couple things too like adding new data when player buys it didnt work can anyone help me with it
You should make another doors tutorial, for example... The Crucifix!
Thanks! How can I save data in multiple places within the game?
it's been a month since he uploaded this video...
Hello GnomeCode, i saw that you have made a horror game like piggy recently, and i wanted to do that too, but i saw somethings are missing on the tutorials that i do need, thing like how a player gets selected as the monster, how the coin system works, how you can buy new skins, map voting stuff like that, so can you please make tutorials for that or help me out on my game, already big thanks🙂
It didn't work and now it's 3am and I'm struggling on how the hell the leaderboard disappeared:,D
@capeknows9804
Жыл бұрын
bruh
Soooo the tower range is broken. When you click on and off and sell it doesnt go away? Any fix?
yo bro but lets say like for example if i have a string value, if its changed in game like the actual value how do i save it? is tht possible
just met you in bee swarm sim today!
buddy... where did the doors tutorials go?!? No rush but I'm still very excitedly waiting. Get it, no rush... because that's the name of the doors monster... nvm
what about saving with item like multiple type of guns/weapons how to apply to it?
Hello I need help. Can you do a video where you need a certain amount of coins to change phases? For a example... I touch a part and if you have 200 coins then reset or die then you change phases with new attacks?
@baconheadhair6938
2 ай бұрын
just check the player coins when they touch the part
Can you make a tutorial on the death screen and boss defeat screen? Like how when you die in dark souls you get YOU DIE or like if you defeat a boss you get VICTORY ACHIEVED or something and is it possible to change the text like for example like instead of you died its Your mom or you can change it to Death Achieved?
Hey gnome code are you okay I’ve seen that you haven’t uploaded in a while good luck can you also continue your does series if not that’s ok thabkyou
Hey gnomecode I know there are a bunch of tutorials for this but can you make a short or long tutorial on how to make the backrooms in roblox?