How To Save Leaderstats Across Different Games - Roblox Studio.

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

КОМЕНТАРІ • 166

  • @fr4st3y
    @fr4st3y  2 роки тому +23

    I have added a paste bin so you can all copy the script.

    • @JJsStuff
      @JJsStuff 2 роки тому +1

      could you make a shop? one that you can buy stuff in one place and use it in the other

    • @fr4st3y
      @fr4st3y  2 роки тому +2

      @@JJsStuff possibly

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

      @@fr4st3y Hey fr4st3y! I had a quick question about the data store part of the code... How would I add more data values? Such as if I wanted to save kills and deaths as well as wins.
      Do I first create more save variables?
      Then would I have to repeat the steps in the "else" statement and set new variables for each data value?
      And when I go to set the ds:SetAsync() would I need to repeat the ds:Setsync() in multiple lines or can I target the information in the {} all in one line just separating them with commas?
      If you get a chance please help... Thanks!

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

      @@MYSquadonUA-cam ok, I normally dont reply to comments but heres a link to a video that will help you: ua-cam.com/video/hWhr8ntzq5M/v-deo.html

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

      ​@@MYSquadonUA-cam ​ Yes, you would add more variables, here ill send a customised pastebin for you!: pastebin.com/mH6FLm68

  • @ducklacanard
    @ducklacanard 2 роки тому +21

    5:41 you need to enable studio acces to api services in game settings for this to work if you didn't know

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

    Bro thank you so much ive been trying to find that type of datastore you have earned a sub

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

      No problem dude glad I could help!

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

    Thank You So Much For Doing This Video! This Helped Me Alot!

  • @frozendiamond5010
    @frozendiamond5010 2 роки тому +3

    Thanks bro! I've been looking for this video for months!
    😁

    • @fr4st3y
      @fr4st3y  2 роки тому +2

      np, glad i could help :)

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

    THANK YOU SO MUCH DUDE I WANTED THIS FOR MY DON'T PRESS THE BUTTON GAME FOR THE SHOP THANK YOU!

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

    THANKS SOOO SOO MUCH! I had to Compress all in One Place if this didnt Worked, AND GUESS What CUZ OF YOU, I Made a Seperate Lobby!

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

      Glad I could help you dude!

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

    Ty I was struggling

  • @Whyuko-lh7mv
    @Whyuko-lh7mv 5 місяців тому

    You don’t know how long it took me to find a data store video that takes place in different games.

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

    i like h9w he checks the script somewhere else every new line

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

    another question, now when I created a new script that makes everytime the player dies the value number is increased +1 but when i reEnter the game it didn't saved. For example: I have 2 and i died and now i have 3 but when I reEnter the game i still have 2. How do I fix this?

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

    What would you add if you wanted to save multiple different stats, such as wins and money?

  • @clickingz
    @clickingz 2 роки тому +4

    Thx this actually worked

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

    To do multiple stats, you have to add one local save(whatever number) = (whatevery leader stat). And in the tables you just do {plr.leaderstats.whatever, plr.leaderstats.second one, and so on.

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

    Thank you bro, you earned a new subscriber :)

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

    Very nice videos you help me create my game!

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

    "Unable to cast value to Object" How do i fix that

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

    Thank you! I'm trying to make a game like residence massacre

  • @karenmarin7681
    @karenmarin7681 2 роки тому

    Amazing vídeo, tysm 👏🏻👏🏻💕🔝

  • @a.d.efondation3653
    @a.d.efondation3653 10 місяців тому

    Bool data work too? In order to put other data , have I to change the "Save[1]" in "Save[2]"?

  • @lav9802
    @lav9802 2 роки тому +1

    Hi great video, if you don’t mind is there any change to make that with skins?

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

    Perfect bro, thank you.

  • @thefact301
    @thefact301 13 днів тому

    Thank you so much

  • @ROINUS-Craft
    @ROINUS-Craft 3 місяці тому

    how to text id ?
    what should i write ?

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

    Uhm i already have some datasotres, will this work with them and if yes, does it also matter if the other place is part of the main one or can they not be connected in any other way other than being connected for having the same owner?

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

    How do you get to the other game it’s saying that the other place is in the place

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

    Yo bro quick question, how could I make it that instead of leaderstats it saves the morphs the person has bought and equipped?

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

    do u know how to save a leaderstats and a folder and all items inside of it?

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

      Use a for i,v in pairs loop to get all the children inside the folder and put them all in a table then save the table using a data store when the player leaves and when the player join load all items from the table into the players folder.

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

    Thanks, this will help me make my game

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

    How can we make the same thing for guis?

  • @lionelclementofficial
    @lionelclementofficial 2 роки тому

    for the longest time I wondered how piggy can import their characters from book 1, to book 2 and the coins, I didn't know I needed to copy and paste the scripts in the other games

  • @Iegendarystudio
    @Iegendarystudio 2 роки тому +1

    hey im really late but could you make a tutorial or reply to me telling me how to save items between other games like islands where when you join the game and get a tool and go to the lobby it saves the tools you have, and when you buy something at the lobby and go back to your island it will save.

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

      he did (im VERY late)

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

      You just make a DataStore that stores a table of the inventory and recovers it using the methods in this video.
      Ensuring you create the same folders to clone from that where in your previous game, I hope this helps.

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

    Yo thanks but how do you get it to save across it still doesn't work for me

  • @Premium.Studios
    @Premium.Studios 3 місяці тому

    Hey, I keep getting an error on line 12 saying: "Unable to cast value to Object". I've looked through my scripts many times but there doesn't seem to be an error?

  • @officialpristic
    @officialpristic 5 місяців тому +1

    is there a way to add the wins in the second game without showing the leader stats? so like you get the win but in the leaderboard section with all the players they can’t see your value, but when you join the lobby, everyone can see them?

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

      Thats what im trying to do but

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

    On top❤

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

    Is there a way to make it so it saves across experiences instead of places?

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

      Yes instead of a regular datastore you would use a global data store and add the same datastore script on both experiences and make sure they have the same name. If you can figure it out I would recommend watching a tutorial for it!

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

      @@fr4st3yCan you make a tutorial about it ?

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

    will it work like blockate but you can use it to buy things in other places cause i am using sub places

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

    does this work for levels

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

    what if i wanted to save a players inventory

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

      You would you a data store

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

      @@fr4st3y how would i do that?
      (btw i mean their backpack)

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

      @@opracity Search up a data store script it will explain it

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

    It worked, could you make a proximityprompt version instead of waiting 10 sec? I'm trying to remake doors knob system

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

      it does it automatically

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

      Nvm, i tryed it already, it worked, thxx

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

    Does it save the data also on the main game(The game that we are writing this script on)?

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

    thanks but the leaderstats is saved ?

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

    Can you make a video on how to update it please? I'm trying top make a obby but the leaderstats dont update. Thanks

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

      wdym update? You mean when the player touches the next part they get +1?

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

      @@fr4st3y yeah, i dont really know what its called though

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

    omg your my hero

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

    This also works on Bool Values

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

    how do i make multiple stats

  • @bananachad1026
    @bananachad1026 2 роки тому +1

    hey bro great video! loved it. I have a question, can you make a script like this but instead of a leaderstat a tool? It would be helpful for my dungeon game. Thanks!👍

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

      There are separate tutorials for saving tools with data store service

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

    how to save multiple stats tho?

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

    someone pls help me i cant find severscriptsever
    and its rilly anoying me

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

      U mean serverscriptservice? Its comes just after serverstorage, if its still hard its almost at end of explorer usually. Also if u still cant find it you still can put scripts in workspace, but they will be visible for exploiters

    • @Igrowtreesforlife
      @Igrowtreesforlife 6 місяців тому +1

      You might have renamed serverscriptservice to something else

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

    how could we do this for multiple leaderstats?

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

      Line 6: local save2 = plr.leaderstats."NAME"
      Line 10: save2.Value = Saved[2]
      line 11: local NumberForSaving = {save1.Value, Save2.Value}
      line 17: ds:SetAsync("id_"..plr.UserId, {plr.leaderstats.Wins.Value, plr.leaderstats."NAME".Value})

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

      Then you would repeat this for more

  • @u2er_
    @u2er_ 2 роки тому

    Is there a way to clean up the data that got saved when the player leaves the game?

    • @foguinho___
      @foguinho___ 2 роки тому

      rename the data on the two scripts, i think it should work

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

    for me its inconsistent with when the lobby data loads. can u help

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

      I don't know how to 'speed' up datastores but i'd look at dev forums you'd find a better answer there!

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

      @@fr4st3y it saves in one game but doesnt save to the other

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

      @@kilpamations3477 Have you added the scripts to both games in the correct places? Also check if you have enable the correct security in ' Game Settings 'In studio.

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

      @@fr4st3y its fixed i had a duplicated version in the workspace by accident

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

    Can u do it with a ui button

  • @guganpiesov5911
    @guganpiesov5911 2 роки тому

    Does this script work for like the hunger system or something and if does, do I need the leaderstats script?

  • @nextbotty597
    @nextbotty597 2 роки тому

    Amazing tysm

    • @fr4st3y
      @fr4st3y  2 роки тому

      I'm glad you like it

  • @spencerkesner
    @spencerkesner 2 роки тому

    i wanted it for other games not palces inside game

  • @MafangFento
    @MafangFento 2 роки тому

    can you tell the teleport script please you just skipped it

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

    OMG TYSM

  • @iliketofish6966
    @iliketofish6966 2 роки тому +1

    hey would you be able to help me with my game all i need is to figure out how to get leaderstats to save clicks and rebirths ive tried so many scripts and nothing works ive tried dev forum and everything i just cant get it.

    • @fr4st3y
      @fr4st3y  2 роки тому

      yeah sure you can add me on discord at: Fr4st3y#1600

    • @nickplayz44
      @nickplayz44 2 роки тому

      @@fr4st3y can you help me too

    • @derstofftierboss8346
      @derstofftierboss8346 2 роки тому

      Fr4st3y#1600

    • @fr4st3y
      @fr4st3y  2 роки тому

      Guys for this you can look at one of my old videos im sure it will include a data store script inside of it

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

    does this save the leaderstats over both games?

  • @llukitus7880
    @llukitus7880 2 роки тому +1

    It actually worked for me but the thing is that if i want to put more values like kills it dosen't work

    • @fr4st3y
      @fr4st3y  2 роки тому

      You Would have to change the data store script!

    • @fr4st3y
      @fr4st3y  2 роки тому

      You Could Watch One Of my Tutorials on a simulator, it would have a brief tutorial on how to do that there :)

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

      @@fr4st3y I looked through the simulator videos and I couldn't find it

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

      @@LUCASTHECOOLONE add another data store

  • @raulington
    @raulington 2 роки тому

    PLEASE! make a tutorial on how to save items cross game. i liked and subbed

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

    Godly

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

      ty and love the pfp btw

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

    not working

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

    Hey, I'm confused about the tutorial.
    I tried using your script to support a data save for "Player Pts", "Clan Pts", "Leader Pts", and "Kills" by changing Wins. Name"Wins" so the quoted each scoring system. It wouldn't save them in the starting place. Is there another tutorial you made for swordfight points?

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

      Maybe you didn’t enable api services and http requests

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

      @@kilpamations3477 I already solved it. I was able to pay someone to make the leaderboard I wanted. Thanks for responding anyways.

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

      Are you sure that the player key is not always "id_" .. plr.UserId ? Because you need to save every value into a different key. I can send you my datastore saver (isnt global).

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

    DOESNT WORK.Maybe outdated idk

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

    I already made the games though, what do i do?

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

      If the games are already made just add the scripts into both games and allow the security.

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

      @@fr4st3y Thanks

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

      @@TheBaboon515 np

  • @BloxedZ3R0
    @BloxedZ3R0 2 роки тому

    Could you please make a link to pastebin or type the script here for others to copy?

    • @fr4st3y
      @fr4st3y  2 роки тому

      Yeah Sure. If it helps.

    • @BloxedZ3R0
      @BloxedZ3R0 2 роки тому

      @@fr4st3y you actually read the comments! Imma sub just for that

    • @fr4st3y
      @fr4st3y  2 роки тому

      @@BloxedZ3R0 yeah thanks, I hope to upload soon, im currently working on a video right now

    • @BloxedZ3R0
      @BloxedZ3R0 2 роки тому

      @@fr4st3y im also a roblox scripter! Working on a cafe right now. Im not the best, but I can manage working with lua

    • @fr4st3y
      @fr4st3y  2 роки тому

      @@BloxedZ3R0 I hope the best for your game. You will go far, I script often but i can never finish a game because a new idea always come to mind.

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

    it only saves in one place

  • @lukasolejniczak514
    @lukasolejniczak514 2 роки тому

    How long does it take to transfer

    • @fr4st3y
      @fr4st3y  2 роки тому

      when you load into the other game it will auto transfer instantly

    • @lukasolejniczak514
      @lukasolejniczak514 2 роки тому

      oh

    • @lukasolejniczak514
      @lukasolejniczak514 2 роки тому

      Is there a way to make the transfer instant and read the data while your on a other server

  • @EcoTis
    @EcoTis 2 роки тому +1

    Omg alvin blox alt account

  • @Alexander_Animations
    @Alexander_Animations 2 роки тому

    Thank you for such an amazing video, can you make a script like this but instead of a leaderstats it's for tools

  • @swagiz7997
    @swagiz7997 2 роки тому

    Are you able to do this but with tools?

    • @fr4st3y
      @fr4st3y  2 роки тому

      yeah probably, You will have to look at a different tutorial for that!

    • @swagiz7997
      @swagiz7997 2 роки тому

      @@fr4st3y lil problem ive been looking for like 2 hours never found it

    • @fr4st3y
      @fr4st3y  2 роки тому

      @@swagiz7997 bit late reply but I would use the same thing for a tool data store; search a video on how to use a tool data store then instead of get data store use getglobaldatastore! Hope this helps

    • @backroomstruechaos4053
      @backroomstruechaos4053 2 роки тому +1

      @@swagiz7997 You want the tools to save? Or do you want them to transport:
      1.
      Make a datastore and save an table of all tools in the players Backpack.
      2.
      use TeleportInformation to give TeleportService info about the tools name
      to then require them in the other game and give them to the player

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

    2:17 how DARE you use wait()
    use task.wait(), wait() is deprecated

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

    uhhhh whats this and this

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

    bro wheres the script

  • @ERouting_2.0
    @ERouting_2.0 2 роки тому

    not working :/

    • @Radnom4Life
      @Radnom4Life 2 роки тому

      Enable API access

    • @ERouting_2.0
      @ERouting_2.0 2 роки тому

      @@Radnom4Life I did it before and not working

  • @LTXzz
    @LTXzz 2 роки тому

    2.5k views, well in haha

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

    How do I do this with more than 1 leaderstat

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

    does this work between different places?