How to Make Leaderstats with Datastore in Roblox Studio!

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

ความคิดเห็น • 463

  • @knightjs3790
    @knightjs3790 2 ปีที่แล้ว +212

    You missed a comma, it should be
    datastore:SetAsync("id_"..plr.userId, {plr.leaderstats.Money.Value})
    (this caused a considerable amount of issue, also you should show the script for increasing the leaderstat scores, and at least put the code in the description )
    😐

    • @rainway4152
      @rainway4152 2 ปีที่แล้ว +10

      Thanks you saved my life

    • @7z_aj
      @7z_aj 2 ปีที่แล้ว +7

      thanks for saying this it wasn't working and i didnt know how to fix it

    • @777Nikolaus
      @777Nikolaus 2 ปีที่แล้ว +7

      which line?

    • @TheGamingTrash
      @TheGamingTrash 2 ปีที่แล้ว +4

      now i dont have to write that line 😅

    • @Reuben3210
      @Reuben3210 2 ปีที่แล้ว +1

      What line?

  • @latgala
    @latgala ปีที่แล้ว +8

    Remember for anyone whos planning to use this script, its not userId, now its UserId with a capital at the start.

  • @waggerra
    @waggerra 2 ปีที่แล้ว +7

    Thanks a lot bro ! It worked ! Just a tip for people where it don't work:
    "You missed a comma, it should be
    datastore:SetAsync("id_"..plr.userId, {plr.leaderstats.Money.Value})"

    • @Drauner
      @Drauner 6 หลายเดือนก่อน

      But where???

    • @GoldGamerv-69
      @GoldGamerv-69 5 หลายเดือนก่อน

      @@Drauner learn how to read

    • @Nomo6372
      @Nomo6372 4 หลายเดือนก่อน

      @@GoldGamerv-69 rude but it is easy

  • @Math4Pears-u2p
    @Math4Pears-u2p ปีที่แล้ว

    Bro thanks so much, have been trying this for 2 months. Only yours worked!

  • @RoboRoblox123
    @RoboRoblox123 2 ปีที่แล้ว +7

    This is the least complicated tutorial i could find
    😃

  • @TheCosmicalShadow
    @TheCosmicalShadow 2 ปีที่แล้ว +2

    This saved my game from having a hard time to save data, thank you for the script.

  • @MateCat2
    @MateCat2 ปีที่แล้ว

    Great Video!!!

  • @InventorFlower
    @InventorFlower ปีที่แล้ว +2

    It says that line 14 has an error with casting an value to object, i've checked it 5 times.

    • @ripyourshirt
      @ripyourshirt ปีที่แล้ว

      Same and the internet is no help at all

    • @TotallyAlexEdits
      @TotallyAlexEdits 10 หลายเดือนก่อน

      same for me.

    • @POCDevRBLX
      @POCDevRBLX 2 หลายเดือนก่อน

      @@ripyourshirt This is why you should learn coding by yourself

  • @Ardoy9761
    @Ardoy9761 2 ปีที่แล้ว +3

    thank you. now i can actually save more than just my leaderstats with this with a little editing. Here is a like: 👍

  • @sebastianmojak576
    @sebastianmojak576 2 ปีที่แล้ว

    u deserve more subs, that was really helpful

    • @somebody_2837
      @somebody_2837 2 ปีที่แล้ว

      He copied GamerM8's scripts, he doesn't deserve more subs

    • @dwbgames6011
      @dwbgames6011 2 ปีที่แล้ว

      @@somebody_2837 No one cares, its scripting. Tons of people write code the same, and he's just sharing it to more people that have no idea who gamerm8 is.

    • @somebody_2837
      @somebody_2837 2 ปีที่แล้ว

      @@dwbgames6011 It still doesn't change the fact that he didn't put any effort into this, and instead copied from another person.

    • @dwbgames6011
      @dwbgames6011 2 ปีที่แล้ว

      @@somebody_2837 its a popular way of scripting this, its nothing new

    • @somebody_2837
      @somebody_2837 2 ปีที่แล้ว

      @@dwbgames6011 No it isn't, who even told you that

  • @souze3263
    @souze3263 ปีที่แล้ว +1

    You are one of the few people who make good tutorials. All of the other videos require you to copy and paste things and with this video, I'm actually learning!!!

    • @nualasagoofyahhcat
      @nualasagoofyahhcat ปีที่แล้ว

      YO THATS MY GD ICON AND YOUR NAME IS THE NAME OF MY FRIENDS CAT

    • @souze3263
      @souze3263 ปีที่แล้ว

      @@nualasagoofyahhcat That's pretty cool lol

  • @RealMrBiscuitGaming
    @RealMrBiscuitGaming 2 ปีที่แล้ว +3

    I've got a question how do you make the money go higher by standing on the block? what is the script?

    • @onfirerobloxscripting
      @onfirerobloxscripting  2 ปีที่แล้ว +3

      In the description!

    • @DashenBoi
      @DashenBoi 2 ปีที่แล้ว

      @@onfirerobloxscripting the script didnt work

    • @t8bx
      @t8bx ปีที่แล้ว

      instead of making it like a click event make it a touch event

  • @official_RANDOM_dev
    @official_RANDOM_dev หลายเดือนก่อน +1

    W VIDEO AGAIN

  • @xdjumble5939
    @xdjumble5939 2 ปีที่แล้ว +4

    u got some errors that u didnt acknowledge at the end

  • @starlight3301
    @starlight3301 ปีที่แล้ว

    OMG IT WORKED THANK YOU SO AND SO MUCH! :D

  • @onfirerobloxscripting
    @onfirerobloxscripting  2 ปีที่แล้ว +10

    Hopefully you found the tutorial helpful!

  • @Dinonny
    @Dinonny 2 ปีที่แล้ว +2

    Would be worth it remaking this, as people find the data store script only works half the time

  • @twelve6878
    @twelve6878 2 ปีที่แล้ว +2

    I typed everything exactly the same.. I also enabled the services, but it's not working. I spent 5 hrs looking for the mistake but theres none. THE script is the one thats not working

    • @nomagu
      @nomagu 2 ปีที่แล้ว

      Lemme know if you eventually found anything...

  • @satragy
    @satragy 2 ปีที่แล้ว +2

    I've got a HUGE problem. Whenever i play the script (not on studio) i rejoined and got nothing. When i tested it on studio i got a error saying "Expected identifier when parsing expression, got then"
    please someone help me.

    • @GlitchedUser999
      @GlitchedUser999 2 ปีที่แล้ว

      i got the same... its outdated

    • @brandonwong7284
      @brandonwong7284 2 ปีที่แล้ว

      @@GlitchedUser999 Refer To Pinned Comment

    • @brandonwong7284
      @brandonwong7284 2 ปีที่แล้ว

      Means Ur Missing a ‘)’

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +1

      I can help you on this one! A leaderstats script like this should resolve your problem:
      game.Players.PlayerAdded:Connect(function(Player)

      --- Leaderstats ---

      local leaderstats = Instance.new("Folder", Player)
      leaderstats.Name = "leaderstats"

      local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)
      If you feel that you need to keep making more leaderstats for a game of yours just do the same lines below the first set of lines like this once again...
      "local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)"
      Any occasional text like "(end),end), or end)" at the bottom of your scripts may be needed in result of an issue although they may already be put in place if you type out the script(s) that are shown by hand.
      I hoped this helped you. I plan to become a developer on TH-cam who teaches lots of people scripting and more.

    • @dwbgames6011
      @dwbgames6011 2 ปีที่แล้ว

      @@brandonwong7284 or put a extra ( or )

  • @lisaward406
    @lisaward406 2 ปีที่แล้ว +4

    Whenever I tried to make a script it doesn’t display data for other people. Does this display data or no?

    • @theogray9218
      @theogray9218 2 ปีที่แล้ว +1

      i had the problem even without a datastore. im not sure if this is a global issue, or its just a simple little fix 🤷‍♂️

    • @nogtohall4328
      @nogtohall4328 2 ปีที่แล้ว

      It's a local script then

    • @nogtohall4328
      @nogtohall4328 2 ปีที่แล้ว

      @@theogray9218 It's a local script then

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว

      I can help you on this one! A script like this should resolve your problem:
      game.Players.PlayerAdded:Connect(function(Player)

      --- Leaderstats ---

      local leaderstats = Instance.new("Folder", Player)
      leaderstats.Name = "leaderstats"

      local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)
      If you feel that you need to keep making more leaderstats for a game of yours just do the same lines below the first set of lines like this once again...
      "local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)"
      Any occasional text like "(end),end), or end)" at the bottom of your scripts may be needed in result of an issue although they may already be put in place if you type out the script(s) that are shown by hand.
      I hoped this helped you. I plan to become a developer on TH-cam who teaches lots of people scripting and more.

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +1

      ​@@nogtohall4328 Hello, you actually do not need any local script for a datastore or leaderstats script. This is because of the regular script and its given texts like "local" inside of its script indicating that it can be global to the other local people.
      I hoped this educated you in some form. I plan to become a developer on TH-cam who teaches lots of people scripting and more.

  • @BeeSwarmTadpole
    @BeeSwarmTadpole 2 ปีที่แล้ว +1

    It does work but in my game you can but rebirths but they don't save only if I pick them up like a coin how can I fix this?

  • @Crewsneck
    @Crewsneck 2 ปีที่แล้ว

    thank u soo much this is the only tutorial I could find that actually worked lolol

  • @roblox2480
    @roblox2480 2 ปีที่แล้ว +6

    It went well. I appreciate it. However, the block script is debouncing and I have spent 3 hours trying to eliminate the debounce and have not been able to resolve it. The cooldown does not work. There is a slight delay for those seconds.
    Is there any way to fix this problem?
    Also, if you don't mind me asking, what is the code that solved the debounce?
    I am Japanese and use a translator.
    Sorry for my poor English.
    From Japan🇯🇵❣️.

    • @G-1.GODS.SILENCE
      @G-1.GODS.SILENCE 2 ปีที่แล้ว +1

      Your English is good
      あなたの英語は上手です(Google翻訳を使用すると、これが悪い場合は申し訳ありません)

    • @micamaster100
      @micamaster100 2 ปีที่แล้ว +1

      just change the number in the wait function 😐

    • @AlamRBLX
      @AlamRBLX 2 ปีที่แล้ว

      @@micamaster100 I also am having the same problem he is having and that does not work for me

    • @hshdjdjsjjsjs6075
      @hshdjdjsjjsjs6075 ปีที่แล้ว

      @@AlamRBLX me too but did you solve it now? if yes please tell me how

    • @AlamRBLX
      @AlamRBLX ปีที่แล้ว

      I think i fixed it i just froget how sorry@@hshdjdjsjjsjs6075

  • @cool1800lemonlaw
    @cool1800lemonlaw 2 ปีที่แล้ว +3

    I'm making an obby right now and I already have a leaderstats for stages, and I only want to add one new leaderstats for a new currency in it but I can't figure it out can someone help me please?

    • @DashenBoi
      @DashenBoi 2 ปีที่แล้ว

      dude he made 2 leaderstats in the video with different currency

  • @JohnRobloxGameplay
    @JohnRobloxGameplay 8 หลายเดือนก่อน +1

    Here is a script that if you update the game you keep you data
    local datastore = game:GetService("DataStoreService"):GetDataStore("SaveData")
    game.Players.PlayerAdded:Connect(function(plr)
    wait(1)

    local plrid = "id_"..plr.UserId
    local save1 = plr.leaderstats.Coins
    local save2 = plr.leaderstats.Level

    local GetSaved = datastore:GetAsync(plrid)
    if GetSaved then
    save1.Value = GetSaved[1]
    save2.Value = GetSaved[2]
    else
    local NumberForSaving = {save1.Value, save2.Value}
    datastore:SetAsync(plrid, NumberForSaving)
    end
    end)
    game.Players.PlayerRemoving:Connect(function(plr)
    local plrid = "id_"..plr.UserId
    local NumberForSaving = {plr.leaderstats.Coins.Value, plr.leaderstats.Level.Value}
    datastore:SetAsync(plrid, NumberForSaving)
    end)

    • @MrMan-tz9bq
      @MrMan-tz9bq หลายเดือนก่อน

      thank you

  • @zaintariq120
    @zaintariq120 ปีที่แล้ว

    I'm having trouble with the leader stats part
    so basically I'm trying to make a Shop GUI and whenever you buy something the "taco" value (the currency for my game) subtracts the amount you bought it for
    everything goes smoothly expect for when the taco value should go down it doesn't
    here is my script --->
    game.ReplicatedStorage.ToolEvent.BlackChancla.OnServerEvent:Connect(function(player)
    if player.leaderstats.Tacos.value >= 300 then
    game.ServerStorage.BlackChancla:Clone().Parent = player.Backpack
    player.leaderstats.Tacos.value -= 300
    end
    end)
    can you lmk where i am going wrong in regards to the subtraction of the taco value pls? thank u so much

    • @scratch_Dev721
      @scratch_Dev721 ปีที่แล้ว

      at player.leaderstats.Tacos.value -= 300 it should be player.leaderstats.Tacos.Value = player.leaderstats.Tacos.Value - 300
      plus the value should be uppercase V

  • @mysteryblondee
    @mysteryblondee 2 ปีที่แล้ว +2

    My leaderstats don’t show on the screen in studio or in-game. I’ve enabled API Services and HTTP Requests

    • @1b0m23
      @1b0m23 2 ปีที่แล้ว

      If you still need help just send the script and I'll help you out :)

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +1

      I can help you on this one! A script like this should resolve your problem:
      game.Players.PlayerAdded:Connect(function(Player)

      --- Leaderstats ---

      local leaderstats = Instance.new("Folder", Player)
      leaderstats.Name = "leaderstats"

      local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)
      If you feel that you need to keep making more leaderstats for a game of yours just do the same lines below the first set of lines like this once again...
      "local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)"
      Any occasional text like "(end),end), or end)" at the bottom of your scripts may be needed in result of an issue although they may already be put in place if you type out the script(s) that are shown by hand.
      I hoped this helped you. I plan to become a developer on TH-cam who teaches lots of people scripting and more.

  • @scott9340
    @scott9340 2 ปีที่แล้ว +2

    Could you reply with a script where when you press a button with a Proximity prompt it will + value?

    • @EnvixityVFX
      @EnvixityVFX 2 ปีที่แล้ว +3

      Add a Clickdetector to a part then add a script.The script is: script.Parent.Clickdetector.Mouseclick:connect(function(player)
      player:waitforchild(“leaderstats”):waitforchild(“money”).Value +=1

    • @zellpoxio
      @zellpoxio ปีที่แล้ว +1

      local PP = script.Parent
      PP.RequiresLineOfSight = false
      PP.Triggered:Connect(function(player)
      player.leaderstats.STAT.Value = player.leaderstats.STAT.Value +AMMOUNT
      end)
      something like that

    • @Win2User
      @Win2User 10 หลายเดือนก่อน

      @@zellpoxioPP

    • @zellpoxio
      @zellpoxio 10 หลายเดือนก่อน

      hahaha so funny @@Win2User

  • @GlitchedUser999
    @GlitchedUser999 2 ปีที่แล้ว +1

    worth a sub :D

  • @AlamRBLX
    @AlamRBLX 2 ปีที่แล้ว

    I am having trouble with changing the value of how long it should wait or how much money you get. It works just fine when I copy and paste your script but when change it to my liking it does not work anymore could you PLEASE help me out with this. thanks

  • @Funilly
    @Funilly ปีที่แล้ว

    I have a question, can you make a proximityprompt give add cash to the leaderstats

    • @troglodyteps99
      @troglodyteps99 6 หลายเดือนก่อน

      go into console, server type game.players.username.leaderstats.value = amont you want to give

  • @scopiez1419
    @scopiez1419 2 ปีที่แล้ว +2

    Hey, I have a HUGE problem where when I test my game in studio both of the leaderstats come up, but then when I test it in the game (not on studio) it only shows one of the leaderstats. Can someone help me on this? I gave up and I don't know what to do!

    • @Scryptings
      @Scryptings 2 ปีที่แล้ว

      Make sure your game has access to "API" Server

    • @scopiez1419
      @scopiez1419 2 ปีที่แล้ว

      @@Scryptings I've fixed this already.

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +2

      I can help you on this one! A script like this should resolve your problem:
      game.Players.PlayerAdded:Connect(function(Player)

      --- Leaderstats ---

      local leaderstats = Instance.new("Folder", Player)
      leaderstats.Name = "leaderstats"

      local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)
      If you feel that you need to keep making more leaderstats for a game of yours just do the same lines below the first set of lines like this once again...
      "local (enter the name that you are using) = Instance.new("NumberValue", leaderstats)
      (enter the name that you are using).Name = "(enter the name that you are using)"
      (enter the name that you are using).Value = (choose any number that a new player will begin with)"
      Any occasional text like "(end),end), or end)" at the bottom of your scripts may be needed in result of an issue although they may already be put in place if you type out the script(s) that are shown by hand.
      I hoped this helped you. I plan to become a developer on TH-cam who teaches lots of people scripting and more.

  • @Deviepx
    @Deviepx ปีที่แล้ว +1

    but how can you create that brick that gives you levels and money?

    • @onfirerobloxscripting
      @onfirerobloxscripting  ปีที่แล้ว

      You can use this tutorial :) th-cam.com/video/94YLzh8leuo/w-d-xo.html

  • @MiMiBrokenbourgh
    @MiMiBrokenbourgh 2 ปีที่แล้ว +1

    the "weird brackets" are called curly brackets fyi

  • @TheEcliptic2
    @TheEcliptic2 ปีที่แล้ว +1

    I got an error that said ”Seconds Is not a valid member of ”Players.OfficialVerifiedDev.leaderstats”. I hate this issue please help me!”

  • @toasty5988
    @toasty5988 2 ปีที่แล้ว

    If I decide to change the name of my level or money, should it still be level or money in between the quotation marks?

  • @MythicalChronoseth9999
    @MythicalChronoseth9999 2 ปีที่แล้ว +2

    dataStore:SetAsync("id_"..plr.userId{plr.leaderstats.Cash.Value, plr.leaderstats.RP.Value})

  • @ctxzzzz
    @ctxzzzz ปีที่แล้ว

    I already have a leaderstat with minutes so the other one u did here wont show up, is there any way for me to fix it?

  • @Astyll-qt7vm
    @Astyll-qt7vm 9 หลายเดือนก่อน

    i get a :
    23:33:03.704 Unable to cast value to Object - Server - datastore:14

  • @ZQY15
    @ZQY15 ปีที่แล้ว

    im testing it on roblox studio why wont it show the leaderstats and how to add countdown after player gets score/money

  • @UltraXTN
    @UltraXTN ปีที่แล้ว

    how do you make it so it only gives you the leaderstat once before it doesnt give u more anymore

  • @redrox999
    @redrox999 2 ปีที่แล้ว +1

    bro can you please tell me how you made the brick i want to make a brick that when i touch it it gives some leaderstats

    • @Zero9xi
      @Zero9xi 2 ปีที่แล้ว

      he isn't gonna reply :( i need help with that too

    • @redrox999
      @redrox999 2 ปีที่แล้ว

      @@Zero9xi i already firgured it out the same day lol

    • @Zero9xi
      @Zero9xi 2 ปีที่แล้ว

      oh yea i saw in description

  • @tinyhowearth1343
    @tinyhowearth1343 3 หลายเดือนก่อน

    How did you make the part that makes the money go up 8:64

    • @POCDevRBLX
      @POCDevRBLX 2 หลายเดือนก่อน

      Put this script inside of a part you want to make money go up:
      script.Parent.Touched:Connect(function(hit)
      if hit and hit.Parent:FindFirstChild("Humanoid") then
      local player = game.Players:GetPlayerFromCharacter(hit.Parent)
      task.wait(1) --replace 1 with how much seconds you want it to cooldown
      player.leaderstats.Money.Value += 150 --change 150 to the value you want
      player.leaderstats.Level.Value += 25 --change 25 to the value you want
      end
      end)

  • @SolveKing
    @SolveKing ปีที่แล้ว

    forever thanks dude, god bless you and thanks for sharing

    • @Drauner
      @Drauner 6 หลายเดือนก่อน +1

      Still forever😂😂😂

  • @marxus3709
    @marxus3709 2 ปีที่แล้ว +2

    Well, i have tried everything and nothing works to me :((( i have spent over 5 hours on finding the autosave and something didnt help for my clicker game

    • @WhiteCircle63
      @WhiteCircle63 2 ปีที่แล้ว

      Not works for me too.
      Have you enabled API services and HTTP request? In securities.

    • @marxus3709
      @marxus3709 2 ปีที่แล้ว

      @@WhiteCircle63 Yes i have tried everything but its still not working

    • @applelord4746
      @applelord4746 2 ปีที่แล้ว

      i've spent 4 days

    • @Sapharious_X
      @Sapharious_X 2 ปีที่แล้ว

      Felt that

    • @marxus3709
      @marxus3709 2 ปีที่แล้ว

      @@Sapharious_X Yeah, i am fucking still trying to find it

  • @gamer123-so7ls
    @gamer123-so7ls 7 หลายเดือนก่อน

    didnt work at all thank you soooo sooo sooo sooo much :))))))

  • @LoonaStanGTNH
    @LoonaStanGTNH 8 หลายเดือนก่อน +1

    why does google images show this video as a kpop loona meme?

  • @grtube5643
    @grtube5643 ปีที่แล้ว +1

    leaderstats script:script.Parent.Touched:Connect(function(hit)
    if hit and hit.Parent:FindFirstChild("Humanoid") then
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    task.wait(1) --replace 1 with how much seconds you want it to cooldown
    player.leaderstats.Money.Value += 150 --change 150 to the value you want
    player.leaderstats.Level.Value += 25 --change 25 to the value you want
    end
    end)

  • @macjoeplays
    @macjoeplays 2 ปีที่แล้ว

    wow thanks it works, btw, can I ask, why in the :GetAsync from player added function has two :GetAsync?

  • @Simple-h1k
    @Simple-h1k 3 หลายเดือนก่อน

    tysm but for some reason my 1st leaderstat is not saving

  • @jaydstonesPlays
    @jaydstonesPlays ปีที่แล้ว

    how would i do this for speed i want to make a game that has speed in it but idk how to do that

  • @thxsun279
    @thxsun279 2 ปีที่แล้ว

    I cant save my settings cuz there is a error plis respond i need help with it

  • @OfficialJakeGaming
    @OfficialJakeGaming ปีที่แล้ว

    I LOVE YOU SO MUCH

  • @uru4123
    @uru4123 2 ปีที่แล้ว

    can we add another value just by copying the int value ?

  • @eisenozdemir
    @eisenozdemir 2 ปีที่แล้ว

    i have a clicker gui and it has a value on it. is there any way to make it so the value counter will save?

    • @JeramayaGaming
      @JeramayaGaming 2 ปีที่แล้ว

      Well thats what I have too and to make sure the gui value will save all you have to do is make sure the gui that shows the amount of clicks is going off of the leaderstats.

  • @hshdjdjsjjsjs6075
    @hshdjdjsjjsjs6075 ปีที่แล้ว

    how do i add debounce ?? i dont want to delay it but i want a cooldown

  • @trgcdev1583
    @trgcdev1583 2 ปีที่แล้ว

    Every Thing Worked Fine But I Am Trying To Make A Obby Checkpoint . So I only want to add 1 every checkpoint touched . Please Help

  • @spoonslayer
    @spoonslayer 2 ปีที่แล้ว +1

    can you make a tutorial on how to get +1 wins on the leaderboard when you win a race in the Racing template in roblox studio, that would really help me out! also i love your videos

  • @akiprox7_trollgeandtrollfa640
    @akiprox7_trollgeandtrollfa640 2 ปีที่แล้ว +1

    Tysm man!

  • @MajesticUC
    @MajesticUC 2 ปีที่แล้ว +2

    Thank you so much! This tutorial helped a lot!

    • @Pleds.
      @Pleds. ปีที่แล้ว

      hello majestic! im a fan!

    • @MajesticUC
      @MajesticUC ปีที่แล้ว

      @@Pleds. this was quite a while ago lol...

    • @onfirerobloxscripting
      @onfirerobloxscripting  ปีที่แล้ว

      Sure was

    • @Pleds.
      @Pleds. ปีที่แล้ว

      @@MajesticUC yes lol i just realised

  • @pickle5097
    @pickle5097 2 ปีที่แล้ว

    Thank you soo much for this

  • @CouldBeSpiderman
    @CouldBeSpiderman ปีที่แล้ว

    I copied your script exactly but the "level" doesnt show in the leaderstats, and it doesnt save

  • @arirosen9764
    @arirosen9764 2 ปีที่แล้ว

    just to remind you if you are confused, these are parentheses: (), these are brackets: [], these are curly braces: {}

  • @backroomsnew958
    @backroomsnew958 2 ปีที่แล้ว

    its working but i need help i want to make if player press button get some money and save it now i cant save

  • @D4v1sss
    @D4v1sss 2 ปีที่แล้ว

    Hello, what's the name of the second music, i liked.

  • @LieutenantEvergreen
    @LieutenantEvergreen 2 ปีที่แล้ว

    what if I don't want a cooldown? I'm making an obby so that's why I'm asking

  • @ryanmh4224
    @ryanmh4224 2 ปีที่แล้ว

    was this tutorial copied? because i just saw another video with the same code

  • @Teardt
    @Teardt ปีที่แล้ว

    can i make it so it doesn't have datastore? my game is about exploration and it doesn't require datastore

    • @onfirerobloxscripting
      @onfirerobloxscripting  ปีที่แล้ว

      This tutorial should give you just the leaderstats: th-cam.com/video/Z3FQm_herbA/w-d-xo.html

  • @dkvlogs2711
    @dkvlogs2711 11 หลายเดือนก่อน +1

    7:30 (timestamp)

  • @acmodded8731
    @acmodded8731 2 ปีที่แล้ว

    It works in roblox studion when I test but when I join the normal Roblox Game it doesnt work can someone help?

  • @hshdjdjsjjsjs6075
    @hshdjdjsjjsjs6075 ปีที่แล้ว

    How do i change it that way so its an actual cooldown and not a delay??

  • @ShinyXK
    @ShinyXK 2 ปีที่แล้ว +2

    please comment/provide a pastebin link for the scripts

    • @beamedby6ix
      @beamedby6ix ปีที่แล้ว

      the reason why he doesnt have pastebin links and etc is because the main part of typing it in manually is learning the script

  • @Preston22Forever
    @Preston22Forever 2 ปีที่แล้ว

    4:46
    (Where I left off)

  • @_technoghost_
    @_technoghost_ 2 ปีที่แล้ว +1

    hey guys, if you want, let's say, a stat ui to detect when you make changes to the leaderstat, let me know! i have the perfect script for it :D (created by me cause boredom)

    • @_technoghost_
      @_technoghost_ ปีที่แล้ว

      also works with this datastore

  • @simonsgames9811
    @simonsgames9811 2 ปีที่แล้ว

    Also, when i touch that part it gives me more than 1 level, i replaced 25 from line 6

  • @jupiterinc.2007
    @jupiterinc.2007 ปีที่แล้ว

    How do u make it so money is added every 30 minutes?

  • @invincible_craft
    @invincible_craft ปีที่แล้ว

    can u make it where the part gets deleted after a certain amount of time?

    • @onfirerobloxscripting
      @onfirerobloxscripting  ปีที่แล้ว

      You can add a script into a part and write this:
      task.wait(30) --number in here represents seconds
      script.Parent:Destroy() --Destroys the part

  • @FR3Y4IK
    @FR3Y4IK 2 ปีที่แล้ว

    i have an error:
    ServerScriptService.Datastore:19: attempt to call a number value

    • @theogray9218
      @theogray9218 2 ปีที่แล้ว

      look at the pinned comment, maybe that will help. i had the same error, now i dont get an error, but it doesnt save

    • @FR3Y4IK
      @FR3Y4IK 2 ปีที่แล้ว

      @@theogray9218 same

    • @Doge.374
      @Doge.374 2 ปีที่แล้ว

      go to the dev forum

  • @ciastek666_
    @ciastek666_ ปีที่แล้ว

    Shit not working, datastore isn't working, leaderstats doesent show on the leaderboard

  • @MythicalChronoseth9999
    @MythicalChronoseth9999 2 ปีที่แล้ว +1

    first script
    game.Players.PlayerAdded:Connect(function(player)
    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    local cash = Instance.new ("IntValue") --this all makes the cash leaderstat
    cash.Name = "Cash"
    cash.Parent = leaderstats

    local rp = Instance.new ("IntValue")--this all makes the RP leaderstat
    rp.Name = "RP"
    rp.Parent = leaderstats
    end)

    • @SPACESS
      @SPACESS ปีที่แล้ว +2

      Tysm bro

    • @stephqt2650
      @stephqt2650 ปีที่แล้ว

      life saver !!

  • @shadowmountainz
    @shadowmountainz 6 หลายเดือนก่อน

    Thank you!

  • @DevKing_Phizo
    @DevKing_Phizo ปีที่แล้ว

    how do I destroy the part after it is touched and the value is added

    • @onfirerobloxscripting
      @onfirerobloxscripting  ปีที่แล้ว

      You can add this inside the touched function:
      script.Parent:Destroy()

    • @DevKing_Phizo
      @DevKing_Phizo ปีที่แล้ว

      @@onfirerobloxscripting thank you for the help

  • @TheTeamFast_Tom
    @TheTeamFast_Tom ปีที่แล้ว

    THANK YOU IS WORK!!!!!

  • @newgen_midnight9034
    @newgen_midnight9034 2 ปีที่แล้ว +1

    it only works for 3 stats not more can u do a script for all stats?

    • @VoidiumTheEye
      @VoidiumTheEye 2 ปีที่แล้ว

      just add more, it should be simple

  • @SiahTT
    @SiahTT 2 ปีที่แล้ว

    does this save even if the game is shutdown or the player crashed?

  • @Goosilk
    @Goosilk 2 ปีที่แล้ว

    How do you make it so this works in 2 games like aimblox

  • @jgplayz
    @jgplayz 2 ปีที่แล้ว

    also if you want to start with a value do "Money.Value = 100" under your stat

  • @speedsings5064
    @speedsings5064 2 ปีที่แล้ว +1

    my 2nd thing wont work D:

  • @MaxyMiliFooty
    @MaxyMiliFooty 2 ปีที่แล้ว

    can you make a video how to save gui

  • @famousamoscooki
    @famousamoscooki 10 หลายเดือนก่อน

    i get an unable t cast value to object error on line 14 of the datastore script, anyone know y

    • @onfirerobloxscripting
      @onfirerobloxscripting  10 หลายเดือนก่อน

      This is an older tutorial, so the method shown here may or may not work very well anymore. If you still have troubles, you can try the updated version of this tutorial: th-cam.com/video/xoui5hR_8IE/w-d-xo.html

  • @gojna8999
    @gojna8999 2 ปีที่แล้ว

    hello can u make a video for no datasave for vip servers ?

  • @tydite5808
    @tydite5808 2 ปีที่แล้ว

    What is your font!!

  • @l.b.2949
    @l.b.2949 ปีที่แล้ว

    I get breakpoints at the beginning of the data store script :/.

  • @fogogelado_9551
    @fogogelado_9551 2 ปีที่แล้ว +1

    someone can explain what is remote servers?

    • @Puppyrjcw
      @Puppyrjcw 2 ปีที่แล้ว

      A remote event basicly the same as a remote server is basicly a other way to do things with out being able to hack into the server and get 999 cash.

  • @ricky_ollie8864
    @ricky_ollie8864 2 ปีที่แล้ว

    How do you make it so that if you get enough stuff you get a badge?

  • @frogybot
    @frogybot 2 ปีที่แล้ว +1

    what is the script for the brick?

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +1

      He put it in the description but I got it for you! :)
      Here is the script to put inside of a wanted part to give you points:
      script.Parent.Touched:Connect(function(hit)
      if hit and hit.Parent:FindFirstChild("Humanoid") then
      local player = game.Players:GetPlayerFromCharacter(hit.Parent)
      task.wait(1) --replace 1 with how much seconds you want it to cooldown
      player.leaderstats.Money.Value += 150 --change 150 to the value you want
      player.leaderstats.Level.Value += 25 --change 25 to the value you want
      end
      end)

    • @frogybot
      @frogybot 2 ปีที่แล้ว

      @@c.o1.e. thx

    • @frogybot
      @frogybot 2 ปีที่แล้ว +1

      @@c.o1.e. Didnt need it anymore, but thx

    • @c.o1.e.
      @c.o1.e. 2 ปีที่แล้ว +2

      @@frogybot Nice :)

  • @melted1504
    @melted1504 ปีที่แล้ว

    Bro I spend over an hour doing this dont lie bro

  • @egg.40
    @egg.40 8 หลายเดือนก่อน

    Modify the script as you'd like:
    local datastore = game:GetService("DataStoreService"):GetDataStore("SaveData")
    game.Players.PlayerAdded:Connect(function(plr)
    wait()
    local plrid = "id_"..plr.UserId
    plr:WaitForChild("leaderstats") -- Wait until leaderstats are initialized
    local save1 = plr.leaderstats.Wins
    local save2 = plr.leaderstats.Kills
    local save3 = plr.leaderstats.Deaths
    local GetSaved = datastore:GetAsync(plrid)
    if GetSaved then
    save1.Value = GetSaved[1]
    save2.Value = GetSaved[2]
    save3.Value = GetSaved[3]
    else
    local NumberForSaving = {save1.Value, save2.Value, save3.Value}
    datastore:SetAsync(plrid, NumberForSaving)
    end
    end)
    game.Players.PlayerRemoving:Connect(function(plr)
    local plrid = "id_"..plr.UserId
    datastore:SetAsync(plrid, {plr.leaderstats.Wins.Value, plr.leaderstats.Kills.Value, plr.leaderstats.Deaths.Value})
    end)

  • @Zecroia
    @Zecroia 2 ปีที่แล้ว

    Please make some kind of speed script, this worked for me, and I can’t find any other good tutorials!!!

  • @estalexpro5299
    @estalexpro5299 2 ปีที่แล้ว

    👍😁 Nice