How To Save Leaderstats Across Different Games - Roblox Studio.

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025
  • How To Save Leaderstats Across Different Games - Roblox Studio.
    If This Video Did Help, Like And Subscribe! Much Appreciated. :)
    leaderstats - pastebin.com/1...
    Data Store - pastebin.com/r...
    My Twitch - twitch.tv/fr4st3yyt

Комментарии • 172

  • @fr4st3y
    @fr4st3y  2 года назад +26

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

    • @JJsStuff
      @JJsStuff 2 года назад +2

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

    • @fr4st3y
      @fr4st3y  2 года назад +3

      @@JJsStuff possibly

    • @MYSquadonYouTube
      @MYSquadonYouTube 2 года назад +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 года назад +2

      @@MYSquadonRUclips ok, I normally dont reply to comments but heres a link to a video that will help you: ruclips.net/video/hWhr8ntzq5M/видео.html

    • @fr4st3y
      @fr4st3y  2 года назад +1

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

  • @ducklacanard
    @ducklacanard 2 года назад +22

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

  • @peacewithbread
    @peacewithbread 2 года назад +7

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

  • @frozendiamond5010
    @frozendiamond5010 2 года назад +4

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

    • @fr4st3y
      @fr4st3y  2 года назад +2

      np, glad i could help :)

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

  • @Bl3ckyy
    @Bl3ckyy Год назад +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  Год назад

      Glad I could help you dude!

  • @gabrielccbr
    @gabrielccbr Год назад +2

    Ty I was struggling

  • @LaxmisudhaB
    @LaxmisudhaB Год назад

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

  • @clickingz
    @clickingz 2 года назад +4

    Thx this actually worked

  • @NotJohnDevs
    @NotJohnDevs Год назад

    Very nice videos you help me create my game!

  • @theviper0293
    @theviper0293 Год назад

    Thank you bro, you earned a new subscriber :)

  • @itsANormalDucks
    @itsANormalDucks 28 дней назад +1

    Cool dude! Just asking.. How do i make a badge like tds? Like.. You get a badge in different game then a UI open in the main game which have a claim badhe that gives you the badge??

    • @fr4st3y
      @fr4st3y  28 дней назад

      sorry bro never played tds idk

    • @itsANormalDucks
      @itsANormalDucks 19 дней назад

      ​@fr4st3y I have a question, how do I add a Desire place in the asset manager?

    • @fr4st3y
      @fr4st3y  18 дней назад

      @@itsANormalDucks create a new experience inside the experience folder

    • @itsANormalDucks
      @itsANormalDucks 18 дней назад

      @fr4st3y ok, ty

  • @HYZIOUS
    @HYZIOUS 13 часов назад

    how do you make the leaderstat save, so if the player rejoined

  • @Docoman_NarrowOne
    @Docoman_NarrowOne Год назад +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?

  • @divalhans7125
    @divalhans7125 9 месяцев назад

    Perfect bro, thank you.

  • @karenmarin7681
    @karenmarin7681 2 года назад

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

  • @thefact301
    @thefact301 3 месяца назад

    Thank you so much

  • @Levi_CG
    @Levi_CG 6 месяцев назад

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

  • @tigz1889
    @tigz1889 6 месяцев назад

    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.

  • @y54trgew3rfa
    @y54trgew3rfa Год назад

    Thanks, this will help me make my game

    • @fr4st3y
      @fr4st3y  Год назад

      np :)

    • @y54trgew3rfa
      @y54trgew3rfa Год назад

      @@fr4st3y You're underrated

    • @fr4st3y
      @fr4st3y  Год назад

      @@y54trgew3rfa thx dude appreciate it!

  • @TeamScrypted
    @TeamScrypted 4 дня назад

    how to make 2 leaderstat saves? like cash and kills

  • @a.d.efondation3653
    @a.d.efondation3653 Год назад

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

  • @Mikegaming202
    @Mikegaming202 Год назад +1

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

  • @TotallyAlex123
    @TotallyAlex123 Год назад

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

  • @zebra_x6420
    @zebra_x6420 5 месяцев назад

    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?

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

  • @lav9802
    @lav9802 2 года назад +1

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

  • @matiasgrief
    @matiasgrief Год назад

    On top❤

  • @rubyhedgewood7124
    @rubyhedgewood7124 Год назад

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

  • @adude200
    @adude200 10 месяцев назад

    omg your my hero

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

  • @symbiote626
    @symbiote626 7 месяцев назад

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

  • @Koofi2
    @Koofi2 9 месяцев назад

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

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

  • @Docoman_NarrowOne
    @Docoman_NarrowOne Год назад

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

  • @scriptbIox
    @scriptbIox 5 месяцев назад

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

    • @fr4st3y
      @fr4st3y  5 месяцев назад

      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.

  • @nextbotty597
    @nextbotty597 2 года назад

    Amazing tysm

    • @fr4st3y
      @fr4st3y  2 года назад

      I'm glad you like it

  • @guganpiesov5911
    @guganpiesov5911 2 года назад

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

  • @Mysterykingdom
    @Mysterykingdom Год назад

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

  • @ROINUS-Craft
    @ROINUS-Craft 6 месяцев назад

    how to text id ?
    what should i write ?

  • @MarcellsEntertainmentlifestyle
    @MarcellsEntertainmentlifestyle 6 месяцев назад

    does this work for levels

  • @EazyDaysPLAYZ
    @EazyDaysPLAYZ 9 месяцев назад

    OMG TYSM

  • @apekz3592
    @apekz3592 2 года назад

    Godly

    • @fr4st3y
      @fr4st3y  2 года назад

      ty and love the pfp btw

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

  • @vesnanechkovska5015
    @vesnanechkovska5015 11 месяцев назад

    How can we make the same thing for guis?

  • @ThatBoyRocky2k
    @ThatBoyRocky2k Год назад

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

  • @LaxrSilv
    @LaxrSilv 5 месяцев назад

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

  • @souleyassk1778
    @souleyassk1778 Год назад

    thanks but the leaderstats is saved ?

  • @raulington
    @raulington 2 года назад

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

    • @darkpro_xgm
      @darkpro_xgm 2 года назад

      What

    • @raulington
      @raulington 2 года назад

      @@darkpro_xgm stubid?

    • @darkpro_xgm
      @darkpro_xgm 2 года назад

      @@raulington oh you meant items

    • @darkpro_xgm
      @darkpro_xgm 2 года назад

      @@raulington I want a tutorial on that too

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

  • @Epicicness
    @Epicicness Год назад

    This also works on Bool Values

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

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

  • @SweFromSe
    @SweFromSe Год назад

    does this save the leaderstats over both games?

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

  • @HarryGay307
    @HarryGay307 Год назад

    how do i make multiple stats

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

  • @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 2 года назад

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

    • @CrazyCheeseGod
      @CrazyCheeseGod 2 года назад

      @@LUCASTHECOOLONE add another data store

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

  • @DylanSnider
    @DylanSnider 2 года назад

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

  • @gamerman1511
    @gamerman1511 Год назад

    Can u do it with a ui button

  • @Skellpawn
    @Skellpawn Год назад

    how to save multiple stats tho?

  • @spencerkesner
    @spencerkesner 2 года назад

    i wanted it for other games not palces inside game

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

  • @VolumetricsStudio
    @VolumetricsStudio 6 месяцев назад

    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?

  • @NotPensive
    @NotPensive 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.

    • @NotPensive
      @NotPensive 2 года назад

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

    • @fr4st3y
      @fr4st3y  2 года назад

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

    • @NotPensive
      @NotPensive 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 года назад

      @@NotPensive 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.

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

  • @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 9 месяцев назад +1

      You might have renamed serverscriptservice to something else

  • @MafangFento
    @MafangFento 2 года назад

    can you tell the teleport script please you just skipped it

  • @swagiz7997
    @swagiz7997 3 года назад

    Are you able to do this but with tools?

    • @fr4st3y
      @fr4st3y  3 года назад

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

    • @swagiz7997
      @swagiz7997 3 года назад

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

  • @EcoTis
    @EcoTis 3 года назад +1

    Omg alvin blox alt account

  • @TheBaboon515
    @TheBaboon515 2 года назад

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

    • @fr4st3y
      @fr4st3y  2 года назад

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

    • @TheBaboon515
      @TheBaboon515 2 года назад

      @@fr4st3y Thanks

    • @fr4st3y
      @fr4st3y  2 года назад

      @@TheBaboon515 np

  • @ExploiterReporter123
    @ExploiterReporter123 Год назад

    it only saves in one place

  • @TheEpokGaming
    @TheEpokGaming 10 месяцев назад +1

    not working

  • @Triploonic
    @Triploonic 7 месяцев назад

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

  • @Seesuvakasinimene
    @Seesuvakasinimene Год назад

    DOESNT WORK.Maybe outdated idk

  • @UselessGamz
    @UselessGamz Год назад

    uhhhh whats this and this

  • @LTXzz
    @LTXzz 2 года назад

    2.5k views, well in haha

  • @BobaBoyei
    @BobaBoyei Год назад

    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

  • @undercoveray
    @undercoveray 15 дней назад

    your keyboard is so annoying

  • @MyBlickyY
    @MyBlickyY 6 месяцев назад

    How do I do this with more than 1 leaderstat