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
I have added a paste bin so you can all copy the script.
could you make a shop? one that you can buy stuff in one place and use it in the other
@@JJsStuff possibly
@@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!
@@MYSquadonRUclips ok, I normally dont reply to comments but heres a link to a video that will help you: ruclips.net/video/hWhr8ntzq5M/видео.html
@@MYSquadonRUclips Yes, you would add more variables, here ill send a customised pastebin for you!: pastebin.com/mH6FLm68
5:41 you need to enable studio acces to api services in game settings for this to work if you didn't know
Thank You So Much For Doing This Video! This Helped Me Alot!
Thanks bro! I've been looking for this video for months!
😁
np, glad i could help :)
Bro thank you so much ive been trying to find that type of datastore you have earned a sub
No problem dude glad I could help!
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!
Glad I could help you dude!
Ty I was struggling
THANK YOU SO MUCH DUDE I WANTED THIS FOR MY DON'T PRESS THE BUTTON GAME FOR THE SHOP THANK YOU!
np
Thx this actually worked
Very nice videos you help me create my game!
Thank you bro, you earned a new subscriber :)
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??
sorry bro never played tds idk
@fr4st3y I have a question, how do I add a Desire place in the asset manager?
@@itsANormalDucks create a new experience inside the experience folder
@fr4st3y ok, ty
how do you make the leaderstat save, so if the player rejoined
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?
Perfect bro, thank you.
Amazing vídeo, tysm 👏🏻👏🏻💕🔝
Thank you so much
i like h9w he checks the script somewhere else every new line
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.
Thanks, this will help me make my game
np :)
@@fr4st3y You're underrated
@@y54trgew3rfa thx dude appreciate it!
how to make 2 leaderstat saves? like cash and kills
Bool data work too? In order to put other data , have I to change the "Save[1]" in "Save[2]"?
What would you add if you wanted to save multiple different stats, such as wins and money?
just add it
Thank you! I'm trying to make a game like residence massacre
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?
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
Hi great video, if you don’t mind is there any change to make that with skins?
On top❤
will it work like blockate but you can use it to buy things in other places cause i am using sub places
omg your my hero
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.
he did (im VERY late)
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.
Yo bro quick question, how could I make it that instead of leaderstats it saves the morphs the person has bought and equipped?
Does it save the data also on the main game(The game that we are writing this script on)?
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!👍
There are separate tutorials for saving tools with data store service
It worked, could you make a proximityprompt version instead of waiting 10 sec? I'm trying to remake doors knob system
it does it automatically
Nvm, i tryed it already, it worked, thxx
do u know how to save a leaderstats and a folder and all items inside of it?
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.
Amazing tysm
I'm glad you like it
Does this script work for like the hunger system or something and if does, do I need the leaderstats script?
Yo thanks but how do you get it to save across it still doesn't work for me
how to text id ?
what should i write ?
does this work for levels
OMG TYSM
Godly
ty and love the pfp btw
Is there a way to make it so it saves across experiences instead of places?
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!
@@fr4st3yCan you make a tutorial about it ?
How can we make the same thing for guis?
How do you get to the other game it’s saying that the other place is in the place
"Unable to cast value to Object" How do i fix that
thanks but the leaderstats is saved ?
PLEASE! make a tutorial on how to save items cross game. i liked and subbed
What
@@darkpro_xgm stubid?
@@raulington oh you meant items
@@raulington I want a tutorial on that too
Can you make a video on how to update it please? I'm trying top make a obby but the leaderstats dont update. Thanks
wdym update? You mean when the player touches the next part they get +1?
@@fr4st3y yeah, i dont really know what its called though
This also works on Bool Values
yes it does :)
Thank you for such an amazing video, can you make a script like this but instead of a leaderstats it's for tools
You can also save your character as a model and import it in any of your games
wait fr?
@@adriennelehman3164
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.
yeah sure you can add me on discord at: Fr4st3y#1600
@@fr4st3y can you help me too
Fr4st3y#1600
Guys for this you can look at one of my old videos im sure it will include a data store script inside of it
does this save the leaderstats over both games?
Yes
Is there a way to clean up the data that got saved when the player leaves the game?
rename the data on the two scripts, i think it should work
how do i make multiple stats
what if i wanted to save a players inventory
You would you a data store
@@fr4st3y how would i do that?
(btw i mean their backpack)
@@opracity Search up a data store script it will explain it
It actually worked for me but the thing is that if i want to put more values like kills it dosen't work
You Would have to change the data store script!
You Could Watch One Of my Tutorials on a simulator, it would have a brief tutorial on how to do that there :)
@@fr4st3y I looked through the simulator videos and I couldn't find it
@@LUCASTHECOOLONE add another data store
for me its inconsistent with when the lobby data loads. can u help
I don't know how to 'speed' up datastores but i'd look at dev forums you'd find a better answer there!
@@fr4st3y it saves in one game but doesnt save to the other
@@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.
@@fr4st3y its fixed i had a duplicated version in the workspace by accident
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?
Maybe you didn’t enable api services and http requests
@@kilpamations3477 I already solved it. I was able to pay someone to make the leaderboard I wanted. Thanks for responding anyways.
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).
Can u do it with a ui button
I'd assume so.
how to save multiple stats tho?
i wanted it for other games not palces inside game
How long does it take to transfer
when you load into the other game it will auto transfer instantly
oh
Is there a way to make the transfer instant and read the data while your on a other server
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?
Could you please make a link to pastebin or type the script here for others to copy?
Yeah Sure. If it helps.
@@fr4st3y you actually read the comments! Imma sub just for that
@@NotPensive yeah thanks, I hope to upload soon, im currently working on a video right now
@@fr4st3y im also a roblox scripter! Working on a cafe right now. Im not the best, but I can manage working with lua
@@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.
how could we do this for multiple leaderstats?
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})
Then you would repeat this for more
someone pls help me i cant find severscriptsever
and its rilly anoying me
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
You might have renamed serverscriptservice to something else
can you tell the teleport script please you just skipped it
Are you able to do this but with tools?
yeah probably, You will have to look at a different tutorial for that!
@@fr4st3y lil problem ive been looking for like 2 hours never found it
@@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
@@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
Omg alvin blox alt account
haha
I already made the games though, what do i do?
If the games are already made just add the scripts into both games and allow the security.
@@fr4st3y Thanks
@@TheBaboon515 np
it only saves in one place
not working
on API servers
2:17 how DARE you use wait()
use task.wait(), wait() is deprecated
DOESNT WORK.Maybe outdated idk
uhhhh whats this and this
2.5k views, well in haha
yep haha
bro wheres the script
not working :/
Enable API access
@@Radnom4Life I did it before and not working
your keyboard is so annoying
How do I do this with more than 1 leaderstat