Save Player Data with Roblox Datastores

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 670

  • @Kaizentry
    @Kaizentry Рік тому +16

    I was never good with how to use tables so this helped a ton, thank you.

  • @GigaGnome
    @GigaGnome Рік тому +21

    I hope you had a wonderful Christmas with your family. Nice to see you still pushing out videos.

    • @The_Real_Mini
      @The_Real_Mini 3 місяці тому

      bot

    • @GigaGnome
      @GigaGnome 3 місяці тому

      @@The_Real_Mini beep boop i am totally a bot

  • @aznya
    @aznya Рік тому +6

    It didn't work and now it's 3am and I'm struggling on how the hell the leaderboard disappeared:,D

  • @keeguri
    @keeguri Рік тому +16

    GnomeCode is awesome. He makes actually good videos and explains almost everything. Keep it up GnomeCode!

  • @mr_griffolukegriffiths9166
    @mr_griffolukegriffiths9166 Рік тому +38

    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
      @GnomeCode  Рік тому +22

      Excellent points, thanks griffo

    • @GalaxyedRainbow
      @GalaxyedRainbow Рік тому +5

      @@GnomeCode your cool i like you

    • @LuminousLynxz
      @LuminousLynxz Рік тому +2

      @@GnomeCode Can you make more doors?

    • @onewill8905
      @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
      @Prillanator Рік тому

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

  • @Martinchi
    @Martinchi Рік тому +68

    Out of the many UA-camrs 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
      @GamingDude467 Рік тому

      YES

    • @TT_and_CuzT
      @TT_and_CuzT Рік тому

      I agree GnomeCode is #1

    • @BrightDay-tb8jj
      @BrightDay-tb8jj 11 місяців тому

      gnomecode you are da goat when i am a millionaire roblox-developer you can have 1 dollar

    • @BrightDay-tb8jj
      @BrightDay-tb8jj 11 місяців тому

      btw ur website is blocked for some reason :(

    • @dextertheio2857
      @dextertheio2857 5 місяців тому

      @@BrightDay-tb8jjwhat

  • @bisoncool1215
    @bisoncool1215 Рік тому +33

    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
      @avgVar Рік тому +2

      He already did that with lobby elevator video

    • @GreatRamilYT
      @GreatRamilYT Рік тому

      we even not added ambush, dark rooms and more... and you already want to take a step towards multiplayer?

    • @KoalaOnYT_
      @KoalaOnYT_ Рік тому

      @@GreatRamilYT it can already be multiplayer me and my pals have been playing through my version lol

    • @KoalaOnYT_
      @KoalaOnYT_ Рік тому

      @@GreatRamilYT plus we have all the bases we need to recreate the game

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

  • @huttle
    @huttle Рік тому +197

    Can we all agree GnomeCode is the best roblox lua teacher on youtube!! 😊

    • @ummmyah
      @ummmyah Рік тому +4

      Oh most definitely

    • @giuyo
      @giuyo Рік тому +4

      yes it's an awesome thing.

    • @BasedOnBrian
      @BasedOnBrian Рік тому +11

      Better than TheDevKing

    • @TheOfficialPWP
      @TheOfficialPWP Рік тому +4

      yea the others are unhelpful

    • @wolf9903
      @wolf9903 Рік тому +2

      definetly last time i did a tutorial from TheDevKing it didnt even work

  • @YuinAstrophel
    @YuinAstrophel Рік тому +7

    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.

  • @Yuzum3o
    @Yuzum3o Рік тому +3

    i did have to get some help for more leaderstats but your a lifesaver i spent hours on trying before hand thanks

  • @Ironbaby08
    @Ironbaby08 Рік тому +6

    Thanks gnome for always doing tutorials on things we all know other roblox how to creators can never do due to their laziness

  • @LandonCotton223
    @LandonCotton223 Місяць тому +1

    awesome video! but i do have a question, is it possible to access a players saved data? like say "noob" had 50 dollars in my game would i be able to access "noobs" data and interact with it? like change his 50 to 100

  • @Afarmcow
    @Afarmcow Рік тому +5

    i made a datastore but one of the variables doesn't work, when it changes, it doesn't fire the "changed" function

  • @DaAccountName
    @DaAccountName Рік тому +4

    i was about to add datastores and then i got the notification about a gnomecode video

  • @PoggersFloppa
    @PoggersFloppa 2 місяці тому

    Amazing video, I learned so much like how tables work and ipairs!

  • @2_toastedbagels
    @2_toastedbagels Рік тому +1

    All the other videos I've watched show you how to do it but don't teach you so thank you gnomecode

  • @Stupefy1111
    @Stupefy1111 Місяць тому +1

    It works but when I make a script to increase the value it doest save that so i can only save on the server and its rlly confusing so someone pls help????

  • @RichRBLX
    @RichRBLX Рік тому

    working on a new game and stuff like thisll really help. thanks, gnome!

  • @BonniePlushie
    @BonniePlushie 8 днів тому

    I dont understand why the script only works with bool values for me. I tried countless times to fix it.

  • @scratchthat8230
    @scratchthat8230 Рік тому +1

    Best lua teacher!, A very calming voice too, Not a screechy 9 yr old, ty

  • @FuntimeAG
    @FuntimeAG 6 місяців тому

    I would suggest for conveniency if you wanna experiment first start off with the loading function and print out what you get because if something is wrong and it saves the wrong thing its a real pain to revert it every time.

  • @Jappley
    @Jappley Рік тому +4

    i dont know if i should feel insulted or honored when he calls me a gnome..

  • @blandpotato545
    @blandpotato545 Рік тому +3

    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
      @diphenylmethane Рік тому

      same it just randomly decides when to save and always loads the default data only

    • @baconheadhair6938
      @baconheadhair6938 9 місяців тому

      then you didn’t do it correctly brother

  • @dunialajla
    @dunialajla 9 місяців тому +1

    Great Video! I learnt a lot from this channel

  • @waffle_doge5594
    @waffle_doge5594 Рік тому +4

    thank you gnomecode for making awesome tutorials and inspiring tons of great games!

  • @GuidingLightIsBack
    @GuidingLightIsBack Місяць тому

    @GnomeCode I have a question, can you make it like a doors rift and saves whichever item is put in?

  • @BingusDev123
    @BingusDev123 Рік тому +2

    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?

  • @MadnessNull
    @MadnessNull Рік тому +4

    I said im gonna look up datastores and this video notif poped up
    Gnome did you put cameras in my room!??! /j

  • @lolofuk87
    @lolofuk87 Рік тому

    Thank you sir, never seen before the repeat until implementation

  • @halalouis3814
    @halalouis3814 Рік тому +19

    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
      @daog_beast4151 Рік тому +1

      bro your a legend tysm

    • @halalouis3814
      @halalouis3814 Рік тому

      @@daog_beast4151 no problem, btw if you need help scripting just ask me, i have quite a lot of experience

    • @Erolsaurus
      @Erolsaurus Рік тому +1

      @@halalouis3814 How would I add another leaderstat to this?

    • @Erolsaurus
      @Erolsaurus Рік тому +1

      @@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
      @halalouis3814 Рік тому +1

      @@Erolsaurusmight be because roblox loads and unloads things weirdly, try using multi-threading

  • @AlanShogs56
    @AlanShogs56 10 місяців тому

    Great Video! Was Helpfull for me that dosent understand DataStores.

  • @Acredition912
    @Acredition912 Місяць тому

    I'm wondering if the attempts surpass 5 and the data is still not saved, isnt that will wipe out player's data?

  • @froodlenoodle
    @froodlenoodle 2 місяці тому

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

  • @nightlightworld9964
    @nightlightworld9964 Рік тому +5

    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
      @doinic09 Рік тому +2

      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.

  • @hattinnh
    @hattinnh 4 місяці тому

    Thank you for posting - learnt a lot!

  • @cryptex6709
    @cryptex6709 Рік тому

    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

  • @jajaredgamer7462
    @jajaredgamer7462 Рік тому +1

    Cool video but why you don’t upload about teddy anymore?

  • @polfailice1401
    @polfailice1401 8 місяців тому

    Bro, u are the best teacher! I like to watching u. Sorry for my English 😅

  • @NeverEverFaceTheDark
    @NeverEverFaceTheDark 11 місяців тому

    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

  • @SergeantNooob
    @SergeantNooob Рік тому

    what a coincidence, I was just looking for videos about datastore

  • @twizzitch3127
    @twizzitch3127 Рік тому +2

    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?

  • @pengweifeng1222
    @pengweifeng1222 12 днів тому

    Why is mine got an error said: values being nil while saving datastore

  • @7a8a13a5
    @7a8a13a5 Рік тому

    yes the plugin edit video sounds great too :)

  • @AndersonDosGames
    @AndersonDosGames Рік тому +1

    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

  • @joncepearce7293
    @joncepearce7293 3 місяці тому

    What if setting the player's data fails all five attempts? Isn't it safer to not check the attempt number at all?

  • @nickkingpiggy2651
    @nickkingpiggy2651 Рік тому +1

    This will be helpful and also I bought some of your merch

  • @epicfriez
    @epicfriez Рік тому +2

    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
      @autisticbluesloth5244 Рік тому

      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
      @autisticbluesloth5244 Рік тому

      to get wether or not a player is a certain distance you do (CapturePoint.Position - Character.Position).magnitude

  • @degeneradodoscomentaro_
    @degeneradodoscomentaro_ Рік тому +1

    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!

  • @27op0qks
    @27op0qks Рік тому

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

  • @yeetboiaug9615
    @yeetboiaug9615 10 місяців тому +1

    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

  • @alejandrorivera9694
    @alejandrorivera9694 Рік тому +2

    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?

  • @Eltoxxx
    @Eltoxxx Рік тому +1

    I dont want all of the data to be a leaderstat tho

  • @MythicMemorys
    @MythicMemorys 10 місяців тому +2

    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
      @Thomasis5 10 місяців тому +1

      "{}" 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
      @MythicMemorys 10 місяців тому

      @@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
      @Thomasis5 10 місяців тому

      @@MythicMemorys Ok, my bad😅

    • @TheGenesis1223
      @TheGenesis1223 7 місяців тому +1

      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

  • @kokskoksowy
    @kokskoksowy Рік тому +1

    why does the console say:
    Argument 1 missing or nil

  • @Bambuuck
    @Bambuuck 3 місяці тому

    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.

  • @yourmomma7981
    @yourmomma7981 Рік тому +1

    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!

  • @cloaker1903
    @cloaker1903 Рік тому +1

    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

  • @alex965t9
    @alex965t9 Рік тому +1

    I love your content man
    i learn a lot

  • @SeasonxRBLX
    @SeasonxRBLX Рік тому +1

    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!

  • @scratchthat8230
    @scratchthat8230 Рік тому +1

    That's great and all but how do you store a list of values that I can table.Insert() more values into?

  • @Mert-frick_whoever_took_mert
    @Mert-frick_whoever_took_mert 8 місяців тому +1

    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
      @radikalcreates 7 місяців тому

      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

  • @boi875_RBLX
    @boi875_RBLX Рік тому

    I recommend checking out DataStore2, as it is one of the best data store modules out there, many popular games uses it as it is really good at preventing dataloss and other bad things!

  • @_-Froggy-_
    @_-Froggy-_ Рік тому +1

    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

  • @itsksd
    @itsksd 29 днів тому +1

    THANK YOU ALOTTTTTTTT

  • @AndriyRoblox
    @AndriyRoblox Рік тому +1

    Can someone explain why i save data in number format but my places sees this data as nil?
    (I want make shop but i have a lot of places)

  • @itsrellw
    @itsrellw Рік тому +1

    Can you make a series of how to make a steep steps game..

  • @maaloyy_
    @maaloyy_ Рік тому

    You are helping so much! Liked and followed you!

  • @NicTheFreak02
    @NicTheFreak02 Рік тому +1

    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
      @baconheadhair6938 9 місяців тому

      you probably are added 1m value on the client not the server or recheck your save code for mispelld

  • @vroomgt5743
    @vroomgt5743 3 місяці тому

    This really helps for my game👍

  • @bilbobaggins5091
    @bilbobaggins5091 6 місяців тому

    Also, how do you change the values of for example a dollar/money leaderstat ingame? I have my dollars at 1M (I forgot how I even got it there 💀) and I'm trying to make a shop where you can buy things and your money goes down after buying. But every time I make a buy/shop button decrease the dollars value (for the price) and press stop, it just goes back to 1 million after I rejoin as if I never bought something.

  • @natsieee25
    @natsieee25 Рік тому

    GnomeCode i have something to ask you, can you make a game like steep steps, i really wanted a tutorial series for it..

  • @sapphiresky670
    @sapphiresky670 Рік тому +1

    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
      @KhalidBro Рік тому +3

      create it urself. he cant help u with everything

  • @roninexplode
    @roninexplode Рік тому

    Could you help with the footstep video? Nothing works when I do it all, not even the walking animation you made

  • @SandrockYT
    @SandrockYT 4 місяці тому

    Amazing tutorial! earned a like and sub

  • @mehmetemindurmus6616
    @mehmetemindurmus6616 Рік тому +1

    didnt work can you help me

  • @Swiftlybrunette
    @Swiftlybrunette Рік тому

    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

  • @alejandrorivera9694
    @alejandrorivera9694 Рік тому +1

    it's been a month since he uploaded this video...

  • @ZeonGuy
    @ZeonGuy 9 місяців тому

    The changed event seems to not fire when the dollars is changed. Why is that?

  • @mrminion545
    @mrminion545 Рік тому

    This is gonna be useful in my next game since its a long game!

  • @aydreytherat
    @aydreytherat Рік тому +1

    I followed every step and it didnt work

  • @devakashv4702
    @devakashv4702 5 місяців тому

    Why are we setting the leaderstats.Parent = player at the last, like why not near the same place where we set its name?

    • @MrFoxANDnoobie
      @MrFoxANDnoobie 4 місяці тому

      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

  • @MoonLmao
    @MoonLmao Рік тому

    I've noticed the brightness in recent videos has been quite low- anyone know why?

  • @huy_nigera
    @huy_nigera 9 місяців тому

    Thank you, this really good working

  • @IndevGames-sl9np
    @IndevGames-sl9np 4 місяці тому

    This guy is a goat tysm!

  • @elmerald210
    @elmerald210 Рік тому +1

    you probably wont see this, but can you make a ambush ai for the doors tutorials.

  • @bielortiz2166
    @bielortiz2166 8 місяців тому

    It isn't working for me. It says that value of type nil cannot be converted into a number. It happens on line 46, when I'm putting the Dollars.Value equal to the sessionData[player.UserId].Dollars. Anyone can help me?

  • @mrtmrv5873
    @mrtmrv5873 Рік тому +1

    Can you make a shooter game series?

    • @alejandrorivera9694
      @alejandrorivera9694 Рік тому

      He needs to finish doors series first

    • @J3RiC3LL
      @J3RiC3LL Рік тому

      That is actually a great idea I hope he does :) maybe after that he can maybe make a combat game like a sword fight game

  • @breadCaves
    @breadCaves 8 місяців тому +1

    Sadly, the data isnt saving for some reason and it always makes it the default value.

    • @roatninthethird
      @roatninthethird 8 місяців тому

      you made a mistake somewhere in your code

    • @jerrypilkles
      @jerrypilkles 7 місяців тому

      @@roatninthethird no it just doesn't save even if you copy it word for word

    • @roatninthethird
      @roatninthethird 7 місяців тому

      @@jerrypilkles worked for me

    • @flision99
      @flision99 7 місяців тому

      @@roatninthethird Mine is giving the ErrorMsg when leaving the game

    • @roatninthethird
      @roatninthethird 7 місяців тому

      @@flision99 i already gave up on coding, you're on your own

  • @ExtraFerance
    @ExtraFerance Рік тому

    hes most likely on a hiatus on youtube, hes still active on roblox so dont worry.

  • @Dimayuplay
    @Dimayuplay 6 місяців тому

    Didnt work for some reason. Maybe cuz its a bool value.
    Edit: nvm ive just screwed it up.

  • @TheSuperWeasel-two
    @TheSuperWeasel-two 7 місяців тому

    Idk why it wont work for me
    edit: I realised why, it's because the script didnt even know the value was changing since i did it on a local script(I just used a remote event)

  • @Bambuuck
    @Bambuuck Рік тому +1

    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!

  • @tommarnt
    @tommarnt 10 місяців тому

    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)

  • @SafixGames
    @SafixGames Рік тому +1

    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
      @ghostlyn69 Рік тому

      You could of just said “hey gnomecode how can I fully rip off doors with nothing original”

    • @doinic09
      @doinic09 Рік тому

      @@ghostlyn69 trueee

  • @TheCaptainGooey
    @TheCaptainGooey Рік тому

    Could you please consider doing a video on Ordered Data Stores?

  • @MrPablo-uf5zr
    @MrPablo-uf5zr Рік тому +1

    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

  • @koainanis5840
    @koainanis5840 Рік тому

    Hey GnomeCode did you stop the Doors Tutorials Series?🤔
    I am waiting for the next part...

  • @annaharrington8397
    @annaharrington8397 4 місяці тому

    How many players is this able to handle? Like, would it start breaking with a couple thousand players?

    • @tiqosc1809
      @tiqosc1809 4 місяці тому

      Nope, you can't have that many people in one server

  • @itzdarkcy7141
    @itzdarkcy7141 Рік тому

    New series! "How to make a game like entry point" rn.

  • @7take93
    @7take93 7 місяців тому

    Thanks! How can I save data in multiple places within the game?