The Script: local Players = game:GetService("Players") local RunService = game:GetService("RunService") local DatastoreService = game:GetService("DataStoreService") local database = DatastoreService:GetDataStore("PlayerData") local sessiondata = {} local DefaultData = { ["Dollars"] = 50 } local function PlayerAdded(player) local leaderstats = Instance.new("Folder") leaderstats.Name = "leaderstats" local Dollars = Instance.new("NumberValue", leaderstats) Dollars.Name = "Dollars" local sucsess = nil local PlayerData = nil local attempt = 1 repeat sucsess,PlayerData = pcall(function() return database:GetAsync(player.UserId) end) if not sucsess then warn(PlayerData) task.wait(3) end attempt += 1 until sucsess or attempt == 5 if sucsess then print("Connected To Database") if not PlayerData then print("No User Data Found, Assigning Default Data") PlayerData = DefaultData end sessiondata[player.UserId] = PlayerData else warn("Unable To Get Data For User: "..player.Name) player:Kick("Unable To Load Your Data, Please Try Again Later! :D") end Dollars.Value = sessiondata[player.UserId].Dollars -- SYNC LEADERSTATS WITH DATASTORE Dollars.Changed:Connect(function() sessiondata[player.UserId].Dollars = Dollars.Value end) leaderstats.Parent = player end local function PlayerRemoved(player) if sessiondata[player.UserId] then local sucsess = nil local errorMsg = nil local attempt = 1 repeat sucsess, errorMsg = pcall(function() database:SetAsync(player.UserId, sessiondata[player.UserId]) end) if not sucsess then warn(errorMsg) task.wait(3) end attempt += 1 until sucsess or attempt == 5 if sucsess then print("Data Saved For User: "..player.Name) else warn("Data Unable To Save For User: "..player.Name) end end end local function ServerShutdown() if RunService:IsStudio() then return end print("Handling Server Shutdown") for i, plr in ipairs(Players:GetPlayers()) do task.spawn(function() PlayerRemoved(plr) end) end end Players.PlayerAdded:Connect(PlayerAdded) Players.PlayerRemoving:Connect(PlayerRemoved) game:BindToClose(ServerShutdown)
@daog_beast4151
Жыл бұрын
bro your a legend tysm
@halalouis3814
Жыл бұрын
@@daog_beast4151 no problem, btw if you need help scripting just ask me, i have quite a lot of experience
@Erolsaurus
Жыл бұрын
@@halalouis3814 How would I add another leaderstat to this?
@Erolsaurus
Жыл бұрын
@@halalouis3814 Now I'm confused. I added a second leaderstat and it worked, but I added a third one and the script stopped working. I went back to two, but it also didn't work.
@halalouis3814
Жыл бұрын
@@Erolsaurusmight be because roblox loads and unloads things weirdly, try using multi-threading
@huttle
Жыл бұрын
Can we all agree GnomeCode is the best roblox lua teacher on youtube!! 😊
@ummmyah
Жыл бұрын
Oh most definitely
@InternetExplorer77777
Жыл бұрын
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
@aznya
Жыл бұрын
It didn't work and now it's 3am and I'm struggling on how the hell the leaderboard disappeared:,D
@capeknows9804
Жыл бұрын
bruh
@DevlonReall
3 ай бұрын
add it to player, not any other
@MadnessNull
Жыл бұрын
I said im gonna look up datastores and this video notif poped up Gnome did you put cameras in my room!??! /j
@mr_griffolukegriffiths9166
Жыл бұрын
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
@LuminousLynxz
Жыл бұрын
@@GnomeCode Can you make more doors?
@onewill8905
11 ай бұрын
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
11 ай бұрын
@@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,}
@keeguri
Жыл бұрын
GnomeCode is awesome. He makes actually good videos and explains almost everything. Keep it up GnomeCode!
@The_Real_Mini
Ай бұрын
bot
@Kaizentry
Жыл бұрын
I was never good with how to use tables so this helped a ton, thank you.
@Afarmcow
11 ай бұрын
i made a datastore but one of the variables doesn't work, when it changes, it doesn't fire the "changed" function
@bisoncool1215
Жыл бұрын
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
@Martinchi
Жыл бұрын
Out of the many KZitemrs 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
10 ай бұрын
YES
@TT_and_CuzT
10 ай бұрын
I agree GnomeCode is #1
@BrightDay-tb8jj
9 ай бұрын
gnomecode you are da goat when i am a millionaire roblox-developer you can have 1 dollar
@BrightDay-tb8jj
9 ай бұрын
btw ur website is blocked for some reason :(
@dextertheio2857
3 ай бұрын
@@BrightDay-tb8jjwhat
@nightlightworld9964
Жыл бұрын
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.
@GigaGnome
Жыл бұрын
I hope you had a wonderful Christmas with your family. Nice to see you still pushing out videos.
@The_Real_Mini
Ай бұрын
bot
@GigaGnome
Ай бұрын
@@The_Real_Mini beep boop i am totally a bot
@gigga2499
Жыл бұрын
GnomeCode please make a hungry pig game pls
@blandpotato545
Жыл бұрын
The script isn’t working for me. I copied everything in the script but it won’t save the cash value in my leaderstats between games
@diphenylmethane
Жыл бұрын
same it just randomly decides when to save and always loads the default data only
@baconheadhair6938
7 ай бұрын
then you didn’t do it correctly brother
@kelast203
Жыл бұрын
Your generosity is confusing. You start your players off with a Ferrari, a Mazda, an Audi, and 50 bucks.
@peepeepoopoohaah
Жыл бұрын
First but nobody cates
@alejandrorivera9694
Жыл бұрын
about what
@Jxhsxn
3 ай бұрын
yes nobody cates
@Hittzo
3 ай бұрын
I cate 😡😡😡😡
@DelTunk
Ай бұрын
I cate
@LightEnjoyers
Жыл бұрын
You lost... I understand you. Learning the roblox studio corners that you didn't knew, making doors tutorials... But WHYYYY
@DaAccountName
Жыл бұрын
i was about to add datastores and then i got the notification about a gnomecode video
@timvlasov7119
Жыл бұрын
please make a Crouch animation for me 😭😭😭
@elmerald210
Жыл бұрын
you probably wont see this, but can you make a ambush ai for the doors tutorials.
@Hyxerin
Ай бұрын
it doesnt work, I leave then rejoin and the data is the base value
@Elitetitantelescopexdd
Ай бұрын
same
@twizzitch3127
Жыл бұрын
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?
@ghostlyn69
Жыл бұрын
Teddy series
@twizzitch3127
Жыл бұрын
@@ghostlyn69 that's more Piggy like than MM
@souze3263
Жыл бұрын
When I join for the first time, it prints 'Connected to database' but not 'Assigning default data' and it doesn't seem to save Incase you need the script, local sessionData = {} local DatastoreService = game:GetService("DataStoreService") local database = DatastoreService:GetDataStore("data") local Players = game:GetService("Players") Players.PlayerAdded:Connect(function(Player) local Folder = Instance.new("Folder") Folder.Parent = Player Folder.Name = "Stats" local Shrine = Instance.new("StringValue") Shrine.Parent = Folder Shrine.Name = "Shrine" local Faction = Instance.new("StringValue") Faction.Parent = Folder Faction.Name = "Faction" local Weapon = Instance.new("IntValue") Weapon.Parent = Folder Weapon.Name = "Weapon" local success = nil local playerData = nil local attempt = 1 repeat success, playerData = pcall(function() return database:GetAsync(Player.UserId) end) attempt += 1 if not success then warn(playerData) task.wait(3) end until success or attempt == 5 if success then print("Connected to database!") if not playerData then print('Assigning default data') playerData = { ["Shrine"] = "", ["Faction"] = "", ["Weapon"] = 0 } end sessionData[Player.UserId] = playerData else warn("Unable to get data for", Player.Name) Player:Kick("Unable to load your data...") end Shrine.Value = sessionData[Player.UserId].Shrine Shrine.Changed:Connect(function() sessionData[Player.UserId].Shrine = Shrine.Value end) Faction.Value = sessionData[Player.UserId].Faction Faction.Changed:Connect(function() sessionData[Player.UserId].Faction = Faction.Value end) Weapon.Value = sessionData[Player.UserId].Weapon Weapon.Changed:Connect(function() sessionData[Player.UserId].Weapon = Weapon.Value end) end) function PlayerLeaving(player) print(player, "is leaving") if sessionData[player.UserId] then local success = nil local errorMsg = nil local attempt = 1 repeat success, errorMsg = pcall(function() database:SetAsync(player.UserId, sessionData[player.UserId]) end) attempt += 1 if not success then warn(errorMsg) task.wait(3) end until success or attempt == 5 if success then print("Data has been saved for the one and only", player.Name) else warn("Sadly unable to save for the one and only", player.Name) end end end game.Players.PlayerRemoving:Connect(PlayerLeaving)
@nxbid
11 ай бұрын
holy thank you
@nxbid
11 ай бұрын
wait this isnt the script
@souze3263
11 ай бұрын
nvm @@nxbid
@SeasonxRBLX
Жыл бұрын
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!
@aydreytherat
Жыл бұрын
I followed every step and it didnt work
@PoggersFloppa
10 күн бұрын
Amazing video, I learned so much like how tables work and ipairs!
@Yuzum3o
Жыл бұрын
i did have to get some help for more leaderstats but your a lifesaver i spent hours on trying before hand thanks
@UnfortunateKera
Жыл бұрын
Bro can you help me?
@_-Froggy-_
Жыл бұрын
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
@PewPewBoi
Жыл бұрын
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.
@mehmetemindurmus6616
Жыл бұрын
didnt work can you help me
@yourmomma7981
Жыл бұрын
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!
@NotUnusuall
Жыл бұрын
Nice Video! If you can/want, can you do a ''How To Make A Battle Cats Game'' series, it would help me with a game im working on, thanks.
@NotUnusuall
Жыл бұрын
If someone wants to join tell me your username and maybe ill see if i can add you. Need: -Scripter -SF Maker -Music Creator
@froodlenoodle
15 күн бұрын
[EDITED BECAUSE I FIGURED IT OUT] I think this code has an issue. The changed function for the dollars value is inside the playeradded function, which surely means it only connects if a player joins and their dollars value is changed at the exact same time? I'm not sure though as it worked for you in the video, but my code doesn't save changes i make to the dollars while playing. Edit: the issue isn't the script, it works absolutely brilliantly (although i still don't exactly understand how), its the fact you need to edit the players dollars value with a global script, otherwise it won't save.
@AndersonDosGames
Жыл бұрын
i accidentally closed the tab which i had this video open in and when i came back it was on the part where it was when i closed it, i guess youtube knows how to use Datastores too
@SafixBG
Жыл бұрын
Hello GnomeCode! Remember when you did tutorials on how to make Doors Roblox? So... Can you make new Doors tutorials? Doors just added Crucifix, Skeleton Key, etc. Can you make tutorials?
@ghostlyn69
Жыл бұрын
You could of just said “hey gnomecode how can I fully rip off doors with nothing original”
@doinic09
Жыл бұрын
@@ghostlyn69 trueee
@Jappley
Жыл бұрын
i dont know if i should feel insulted or honored when he calls me a gnome..
@The_Real_Mini
Ай бұрын
bot
@Jappley
Ай бұрын
@@The_Real_Mini bot
@BingusDev123
Жыл бұрын
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?
@cloaker1903
11 ай бұрын
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
@ZxckWastingTime
Ай бұрын
There prob a video but if anyone can shortly provide a script to change the or explain how to change the leader stats in another script
@alejandrorivera9694
Жыл бұрын
it's been a month since he uploaded this video...
@Acredition912
3 күн бұрын
I'm wondering if the attempts surpass 5 and the data is still not saved, isnt that will wipe out player's data?
@Eltoxxx
11 ай бұрын
I dont want all of the data to be a leaderstat tho
@kokskoksowy
Жыл бұрын
why does the console say: Argument 1 missing or nil
@YuinAstrophel
Жыл бұрын
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.
@The_Real_Mini
Ай бұрын
bot
@YuinAstrophel
Ай бұрын
@@The_Real_Mini tf, you calling me a bot kid?
@The_Real_Mini
Ай бұрын
@@YuinAstrophel yes
@YuinAstrophel
Ай бұрын
@@The_Real_Mini weird
@arandomguywithfriends
Жыл бұрын
Day 3 of asking for part 8 of doors tutorial
@alejandrorivera9694
Жыл бұрын
same
@Bambuuck
Ай бұрын
So, I had a question which appeared after I implemented the script into my game (Great tutorial!), the question is how do I modify those leaderstats using other scripts? e.g. I got a leaderstat which is called "Tutorial completed" and its a boolValue and should become true when my tutorial is completed.
@degeneradodoscomentaro_
Жыл бұрын
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!
@lf9
Жыл бұрын
I solved it while typing this out: (mine worked at first but then it just didn't. I didn't change the script at all and my API is on. It says it saved but when I rejoin the game (in studio) I still get the default values. Does anyone have a solution? I'm new a scripting gnome-noob and I don't understand what happened. I'm getting no errors.) CHECK REPLIES FOR SOLUTION
@lf9
Жыл бұрын
I hit play and then hit "Current: client" so it switched to "Currect: server" where i had free cam. While in freecam i switched my stats from 50 to 1000000 in player leaderstats (like gnomecode) hit STOP then clicked play and it had saved. I'm guessing this is a issue while in studio and it shouldn't be a problem in game
@funnydog7133
Жыл бұрын
I am encountering the same issue as you. I think it may be because I am using local scripts to change values. Try using remote events instead Update: I tried updating my value with a remote event and this solved the issue. I've been trying to figure out what was wrong and this comment helped a lot lol. Thanks
@jajaredgamer7462
Жыл бұрын
Cool video but why you don’t upload about teddy anymore?
@shadowrobot77
Жыл бұрын
So.. Can i buy some data in data[Stores]?
@medinetekgoz
Жыл бұрын
teddy how to get toy dice
@scratchthat8230
Жыл бұрын
That's great and all but how do you store a list of values that I can table.Insert() more values into?
@butterfayne9300
Жыл бұрын
Yo you should make a video on how to make a game like deepwoken.
@itsrellw
Жыл бұрын
Can you make a series of how to make a steep steps game..
@operPan
2 ай бұрын
Hi! Your video worked! Thank you! But how can I make a shop with these money
@SuperGotgames
Жыл бұрын
Very good thank you! Anywhere to download your scripts?
@whiz_seaweed
9 ай бұрын
write it yourself
@AQUArblx-fi2ol
8 ай бұрын
but how do i can save my progress without leader stats
@baconheadhair6938
7 ай бұрын
same way
@MrPablo-uf5zr
Жыл бұрын
i have a hint: you can make teddy a camera part in front of him and then do script add remote event in replicatestorge and then put local script and script it that is: local player = game.Players.LocalPlayer local character = player.Character local ph = character:WaitForChild("Humanoid") local cam = workspace.CurrentCamera game.ReplicatedStorage.Jumpscare.OnClientEvent:Connect(function() cam.CameraType = Enum.CameraType.Scriptable cam.CFrame = workspace.Teddy.CameraPart.CFrame workspace.Teddy.HumanoidRootPart.Anchored = true wait(2) workspace.Teddy.HumanoidRootPart.Anchored = false cam.CameraType = Enum.CameraType.Custom end) make sure to put in teddyai when player health = 0 put fire event of the replicatestorge Jumpscare
@waterymonkey
3 ай бұрын
wtf u on about
@joncepearce7293
Ай бұрын
What if setting the player's data fails all five attempts? Isn't it safer to not check the attempt number at all?
@monosheshofficial2288
Жыл бұрын
Pls where is part 8 doors :( I already sub
@scrumt
Ай бұрын
Im brand new and im sure ive copied your code exactly, but I dont see a leaderboard value for myself.
@alejandrorivera9694
Жыл бұрын
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?
@UltraDark328
3 күн бұрын
bru it only works for leadertstas??
@dreflox
2 ай бұрын
during the PlayerAdded function, the "warn(playerData)" line after the pcall function to load player data throws "Argument 2 missing or nil". wat do?
@dreflox
2 ай бұрын
nevermind i'm silly i copied the code from PlayerLeaving and i left SetAsync instead of GetAsync. All good :) great vid btw
@Mert-frick_whoever_took_mert
6 ай бұрын
someone correct me if im wrong because im very new to all this but i was having the problem where it wouldn't save and i spent hours troubleshooting but it was working all along, you just cant see it working from studio so you have to start an emulation thing from the "Clients and servers" section in the testing tab to see it working so before you spend forever trying to figure out if its working or not do that first because it works for me but not if i use "play"
@radikalcreates
5 ай бұрын
Thank you for pointing that out! I also wondered why it didn't work for a long time, but after reading your comment I went to the Test tab and started a local test server. In the editor view I changed user data, then left the game in the player view. Rejoined and saw that all the data was there! :D
@nickkingpiggy2651
Жыл бұрын
This will be helpful and also I bought some of your merch
@yeetboiaug9615
8 ай бұрын
I need some help. It doesn't work for me. Nothing comes up when I leave. My best guess is that it'd not finding my player ID in the list and therefore not running the leaving function. But why it doesn't find it is what I'm trying to work out. It's been copied word for word
@aqaisback9517
8 ай бұрын
Happens to me too. RIP :)
@aquzr5630
2 ай бұрын
at 16:02 the script doesn't work im not getting any errors i am just getting 0 dollars when i set the thing to 100
@Slimedev56
8 ай бұрын
TIP: if the code is not working, MAKE SURE you typed everything correctly, even the tiniest of errors could cause the script to fail.
@jstarandomdude
8 ай бұрын
on the sample script he made (the one that makes dollars on the leaderboard appears) mine doesnt work? I even tried running print to see where it fails but it runs print meaning it just refuses to make folder called instance
@aqaisback9517
8 ай бұрын
leaderstats HAS TO BE NAMED "leaderstats" otherwise it will not work@@jstarandomdude
@NicTheFreak02
Жыл бұрын
I don't know what I am doing what I am doing wrong. I feel like I wrote this code exact and I have watched this video several times, and the dollar value keeps resetting at 50, even when I add 1,000,000 value to the leaderstats.
@baconheadhair6938
7 ай бұрын
you probably are added 1m value on the client not the server or recheck your save code for mispelld
@Xhernuii
Жыл бұрын
Gnomecode vs chatGPI Who wins?
@waffle_doge5594
Жыл бұрын
thank you gnomecode for making awesome tutorials and inspiring tons of great games!
@The_Real_Mini
Ай бұрын
bot
@Efkannovic
Жыл бұрын
Can you make a Tutorial how do make a game like rainbow friends
@blamyy6310
Ай бұрын
please dont zoom it in so much.
@TheRealZikuds
Жыл бұрын
Could you put the code in either the description or the comments?
@Galax_
Жыл бұрын
Yeah
@JOSUETUBER08
Жыл бұрын
GnomeCode make vídeo like: How to make doors delete past rooms and generate more. Like this
@ghostlyn69
Жыл бұрын
Learn how to code bro
@sebastianavz202
2 ай бұрын
is it safe tho? cant you edit the money value with scripts?
@SpinningSpheres
2 ай бұрын
my brain aint braining... data stores are so hard to understand :(
@Ironbaby08
Жыл бұрын
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
7 ай бұрын
??
@The_Real_Mini
Ай бұрын
bot
@MythicMemorys
9 ай бұрын
If anyone’s watching this a year later and can help I’m confused on what the variable sessiondata does. How are we checking if there is anything inside the sessiondata variable connected to the player when it’s just sessiondata = {}
@Thomasis5
8 ай бұрын
"{}" is used to make a "table" I sadly can't help much, because I'm not very good with so called "tables" I just know that "tables" is used to store multiple stuff inside which you can use later on in scripts Hope it helped ;)
@MythicMemorys
8 ай бұрын
@@Thomasis5 I know what a table is lol im not new to scripting im just confused on how we inserted the player.UserId inside of the sessiondata Variable
@Thomasis5
8 ай бұрын
@@MythicMemorys Ok, my bad😅
@TheGenesis1223
6 ай бұрын
so basically, in the loading script it sets the default values to the players session data, and the saving script reads it, and saves it. and from now on, your player session data will have data in it
@TheHeadlessMario
Жыл бұрын
Hey gnomecode can you PLEASEEEEEEE make a tutorial on how to make a game like bee swarm simulator because i REALLYYYY want to make a game called Cup Horde Simulator
@Erolsaurus
Жыл бұрын
How would I add more values, though?
@lukiraq
Жыл бұрын
GnomeCode, is there a diffrent between wait() and task.wait() ?
@ghostlyn69
Жыл бұрын
Wait is just waiting a the amount of time when the computer reaches that line. Task.wait is when the computer waits for the script before the task.wait to execute if that makes sense. So waiting is just right when the game runs it waits the amount of time and task.wait is waiting for the rest of the code to fully execute before continuing
@tommarnt
8 ай бұрын
task.wait() is delayed i think@@ghostlyn69
@annaharrington8397
3 ай бұрын
How many players is this able to handle? Like, would it start breaking with a couple thousand players?
@tiqosc1809
3 ай бұрын
Nope, you can't have that many people in one server
@jo3zz
7 ай бұрын
my data isnt saving. when i leave it doesnt print success or failure
@dumb_hd
6 ай бұрын
Me too
@mediocreatbest1269
29 күн бұрын
If I wanted to have the players receive their own money doing their own different tasks would I write it in this script?
@menelo
26 күн бұрын
nope
@uncletacky
4 ай бұрын
Everytime i load into the game i always get "attempt to index boolean with ''HasSeenUpdate3', can somebody help me with that? cause gnome didn't show the multiple values so yeah
@tigertylan1133
Жыл бұрын
AYO who wants a FACE REVEAL from this guy? 👇🏻
@blackkray.
Жыл бұрын
I am interested in a standalone for editing datastores! Please gnomecode!!! Love your content btw!
@vroomgt5743
Ай бұрын
This really helps for my game👍
@scratchthat8230
Жыл бұрын
Best lua teacher!, A very calming voice too, Not a screechy 9 yr old, ty
@ButBadGaming34251
Жыл бұрын
Can you make a game like Five Night's at Freddy's in Roblox?I have been trying to find one but there is none that feature animatronics moving oh and Can you add Screech and Dark Rooms?
@yaro_360
Ай бұрын
"Hello, my fellow gnomes! "😆
@phillkruegerjr1416
Жыл бұрын
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
7 ай бұрын
just check the player coins when they touch the part
@bigbengamer5759
Жыл бұрын
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
@Ren_piano
Ай бұрын
how to make a car like this one?
@watchingyt8076
Жыл бұрын
Update teddy🥲 but love the game tho
@devakashv4702
3 ай бұрын
Why are we setting the leaderstats.Parent = player at the last, like why not near the same place where we set its name?
@MrFoxANDnoobie
3 ай бұрын
so everything is loaded before we put it in to the player if one thing errors out then it would not put it into the player
@AshyWoods
Жыл бұрын
Make a game like Type or Die! I want to make a game like Type or Die. I will be calling my game "Type to Win" if you wanna play it.
@tommarnt
8 ай бұрын
has anyone encountered an error where if you change the value of your intvalue, leave the game, join again, and the value is still default? it does not save the data nor load it. can anyone give me a solution. I'll give code (well.. at least i think it is the problem) I'll name sessionData as session btw painted.Value=session[plr.UserId].Painted painted.Changed:Connect(function() session[plr.UserId].Painted = painted.Value end)
Пікірлер: 658