How to Make A Global Leaderboard in Roblox Studio

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2024

Комментарии • 1,1 тыс.

  • @weldondischud
    @weldondischud 3 года назад +186

    him: I'm not gonna waste to much time
    me: *cries in 18 more minutes*

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

      What the fu

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

      @Mr. Creeper Man you have slow net kido or you just dont like watching it HD Mode ?

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

      a

    • @pontus3018
      @pontus3018 4 месяца назад +1

      *too much time

  • @GamingMasterYT100
    @GamingMasterYT100 4 года назад +30

    This is what I asked for like 2 episodes ago thanks so much

    • @GamingMasterYT100
      @GamingMasterYT100 4 года назад

      Ezz you would go into the property’s of the scrolling frame and there is one in there that lets you change how far it scrolls I don’t remember the exact name for it tho

    • @GamingMasterYT100
      @GamingMasterYT100 4 года назад

      Ezz if you are still wanting it to scroll you could just use a regular frame and just space it correctly tho

  • @Swyftey
    @Swyftey 4 года назад +16

    For anybody who seems to have issues with this line:
    *local userName = game.Players:GetNameFromUserIdAsync(tonumber(data.key))*
    and have the error "Players:GetNameFromUserId() failed because HTTP 404 (Not Found)"
    Please add this if statement above that line:
    *if tonumber(data.key) > 0 then*
    and then put an *end* under the two ends that are under the 'break'.

    • @mile.9768
      @mile.9768 2 года назад

      if not tonumber(data.key) > 0 then return end

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

      @@mile.9768 if not {tonumber(data.key)} > 0 then return end

  • @crixxbrixx
    @crixxbrixx 4 года назад +116

    Him: Scripting*
    Me slowly following along: Why does he sound like deppressed chris from mr beast?

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

      Idk

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

      @@anoop_brar lol

    • @classique_
      @classique_ 3 года назад +5

      nooo now I can't unhear this

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

      @@classique_ ikr

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

      he sounds like kreekcraft lol

  • @bojiclips
    @bojiclips 3 года назад +17

    For everyone getting an error from the print(errorMessage) and it says "serverscriptservice.leaderboardshow:24: attempt to perform arithmetic (mul) on number and table - server - leaderboardshow:30", make sure that in "newLbFrame.Position = UDim2.new(0, 0, newLbFrame.Position.Y.Scale + (.08 * #game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder:GetChildren()), 0)" before game.Workspace.GlobalLeaderboard etc. you have a #. I hope you find this helpful!

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

      YOURE A LIFE SAVER THANK YOU SO MUCH

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

      DUDE YOURE LITERALLY AMAZING THANK YOU

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

      @@hii1317 No problem!

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

      Oh my god, tysm! You’re a godsend :D

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

      Thank you so much dude, I was having so much trouble.

  • @zJackkz
    @zJackkz 4 года назад +39

    Really good video, however, ide recommend that when you're getting sorted async you do (false,5,9.22e+17) to prevent exploiters, as it won't show anything above 9.22e+17 (922 quadrillion)

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

      Nobody wants to see that many wins on a leaderboard so just make it math.huge

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

      9.22e+18*

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

      @@eazy7242 math.huge is bigger than 9.22e+18 and nobody wants to see 1.79e309 wins either

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

      you could make the number much lower realistically

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

      i would rather it show the exploiter on the leaderboard cuz then i'd know that that guy exploited and i can ban him

  • @scashion8013
    @scashion8013 3 года назад +21

    Great video. Very quick and with decent explanation, as well as getting it done. The typo part was funny though, I noticed it and had to wait while you were freaking. Thanks for the help!

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

      yes very quick

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

      @@verified0506 yeah 22 minutes so fast

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

      @@Fo1hr that is pretty quick if you need a tutorial for something like this

    • @cexexcex
      @cexexcex Месяц назад

      @@seadrown6252 yea no thats not quick at all more like half of the video is just him creating the leaderboard design or yapping

  • @thejim8765
    @thejim8765 4 года назад +28

    Thank you so much! This is exactly what I needed!
    At least you only knocked over your leaderboard. I made an obby and forgot to anchor all those parts... it was a very difficult obby xD

    • @epicunique1016
      @epicunique1016 4 года назад

      James Steinbrecher do u know how to do this but when u are trying to make a leaderboard for who has bought the most clothes

    • @spidersoda9605
      @spidersoda9605 4 года назад +1

      Epic Unique101 just replace the wins with clothes and go to the script and replace everything that says Wins with Clothes.

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

      @@epicunique1016 yeah, save a variable that increases when someone buys an article of clothing and then call the clothes variable that is saved instead of wins. Basically the same thing he just showed us.

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

      @@epicunique1016 please copy the script

  • @sd1757
    @sd1757 4 года назад +48

    Can you please make a voting system where a GUI is displayed for everyone and when you click an option that button gets highlighted and you know just like map voting systems.

    • @sd1757
      @sd1757 4 года назад +5

      Nevermind I figured it out by myself

    • @alphaexpress6881
      @alphaexpress6881 4 года назад +8

      @@sd1757 He did do a video on voting with GUI on parts anyway for those interested.

    • @oskxzr
      @oskxzr 4 года назад

      Ez

    • @loominatrx
      @loominatrx 4 года назад

      just use math.max and compare it with stuff

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

    Legend man.... LB's were doing my head in but now it works!!!!! Thanks to you. Now for data store.

  • @doksc
    @doksc 4 года назад +41

    HOW DO YOU ALWAYS KNOW EXACTLY WHAT IM LOOKING FOR

  • @DinoDonoz
    @DinoDonoz 2 месяца назад

    finally a tut that not using free models leaderboard, not watched yet, but hopefully this one paid off!

  • @harvingaming3203
    @harvingaming3203 4 года назад +5

    Omg thank you so much it worked, I just started to make a game and conveniently you made the exact thing I needed just a few hours before, you got a new sub :)

  • @Sinthel-1
    @Sinthel-1 Год назад

    20:00 was like at a pantomime screaming he’s behind you. You spelled it position and I was screaming away like omfg it’s there lol

  • @safoansamin2014
    @safoansamin2014 4 года назад +40

    U put more time on designs than scripting ;-;

    • @gcdevzoldaccountlol9723
      @gcdevzoldaccountlol9723 4 года назад +3

      @Francis Dagami well he's right... He spent like the first 8 minutes just setting it up.

    • @SOSCMUNKY300
      @SOSCMUNKY300 4 года назад

      facts

    • @mazen5005
      @mazen5005 4 года назад

      I mean, there was actually barely any design he put it.

    • @mazen5005
      @mazen5005 4 года назад

      In fact there's more scripting than designing in there.

    • @willing-tickle9457
      @willing-tickle9457 3 года назад

      FAX

  • @supergonkdroid3040
    @supergonkdroid3040 4 года назад +9

    welp, good to know that I destroyed my game trying to make this.

  • @chaloguerracachimuel6203
    @chaloguerracachimuel6203 4 года назад +6

    Love this video!!
    Can you make a donation system or donation leaderboard?

    • @Roro_Studios
      @Roro_Studios 4 года назад +3

      It would probably have the same basic concept, but your “Wins” would be called something else, like “R$,” and you’d change that value depending on how much the player donates. :)

    • @TOAST3D
      @TOAST3D 4 года назад

      Theres a model for it

    • @TOAST3D
      @TOAST3D 4 года назад

      I used it in my game

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

      @@TOAST3D ik I answered 4 months later, but if u just use models, u totally didn't put effort in the game

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

      @@Not_Flood 1 model isnt using all models dumbass, why would i script it all if theres already a pre made one

  • @kakashi-lee9198
    @kakashi-lee9198 3 года назад +11

    The first "For Loop" dont work, the Output are Clean

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

      @@eazy7242 He is brazilian so his english is not perfect like me but I am Colombian.

  • @ColinGamer-Ilovegaming
    @ColinGamer-Ilovegaming 6 месяцев назад +1

    Wow, now I can use it in my game!

  • @yazzy4175
    @yazzy4175 3 года назад +4

    I got a few questions.
    How to kick someone from the leaderboard or reset their points/wins?
    Mind making a video on how to protect your events from exploiters firing the server?

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

      you can install a plugin called leaderboard data and if notice someone up there that u think is cheating u can reset their stats

  • @SOSCMUNKY300
    @SOSCMUNKY300 4 года назад +3

    3:10 video mark for me so i can finish this later when i feel like it cuz its too complicated and he does too much

  • @catnibs7961
    @catnibs7961 3 года назад +10

    13:56 gotta go bed now

    • @sovtly
      @sovtly 3 года назад +4

      wake up

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

      gotta go to school. -

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

    This is going to be very useful in my opinion. Very good video!

  • @gavinmichels7160
    @gavinmichels7160 4 года назад +29

    Could you make a tutorial on how to fetch the character's avatar to show on a pedestal?

    • @elitegamingandmore3723
      @elitegamingandmore3723 4 года назад +6

      It’s actually pretty simple by using
      Local PlayerChar = Game.Players.NameOfPlayer.Character:Clone
      PlayerChar.Parent = Workspace
      PlayerChar:MoveTo( Pedestal position)
      Something like this, and sorry for any errors I’m new to scripting

    • @bhevrage
      @bhevrage 4 года назад

      Just use the tool "Load Character" by AlreadyPro. It's free and easier than writing a script.

    • @marcusbautista2630
      @marcusbautista2630 4 года назад

      @@elitegamingandmore3723 Instead of MoveTo i suggest moving the primarypart for this type of situation

    • @marcusbautista2630
      @marcusbautista2630 4 года назад

      And since its a character by default the primarypart is the humanoidrootpart

    • @Sown.
      @Sown. 3 года назад +1

      @@bhevrage he mean the live-updating character

  • @builditontutorial
    @builditontutorial 4 года назад +1

    Dude you make awesome Tutorials

  • @hellonpluto
    @hellonpluto 3 года назад +3

    i made a modulescript which is called each time a score has changed. I put all the scores and players in to a table and use table.sort command. it makes a top 10 leaderboard. it floats my boat and does what i want
    local leaderboard = {}
    leaderboard.sort = function()

    local scores = {}
    -- get all scores

    for i, v in pairs(game.Players:GetChildren()) do
    scores[#scores+1] = v.PlayerVariables.Score.Value.."-"..v.Name
    end

    -- clear leaderboard

    for i, v in pairs(game.Workspace.Leaderboard.LeaderboardGUI.Holder:GetChildren()) do
    v:Destroy()
    end

    table.sort(scores)
    local cnt = 1
    local pos = 0
    local target = 0
    if #scores > 10 then
    target = #scores - 10
    else
    target = 1
    end

    for a = #scores,target,-1 do
    local newrank = game.ReplicatedStorage.LeaderboardFrame:Clone()
    newrank.Rank.Text = cnt
    local temp = string.split(scores[a],"-")
    newrank.PlayerName.Text = temp[2]
    newrank.Score.Text = temp[1]
    newrank.Position = UDim2.new(0,0,pos,0)
    newrank.Parent = game.Workspace.Leaderboard.LeaderboardGUI.Holder
    pos = pos + 0.09
    cnt = cnt + 1
    end
    end
    return leaderboard

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

      how did u learn scripting and coding? Because I want to learn the basics so I can start my game

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

      @@RileyHighBerg hello, i’m not the original commenter but i’d recommend following a beginner series. devking has one here on his channel, and after you’re done with it, you can move on to the advanced. make sure you follow along so that you can learn, don’t just watch the videos

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

      @@kthuludev thank you for replying! I will watch devking beginner coding videos! Before finding your comment I learned some beginner codes which was the language python is it the right language for Roblox?

  • @soulreaper5154
    @soulreaper5154 4 года назад +5

    Thanks for the tutorial, also please could you make a tutorial on how to animate and script the animation as it will be very useful. Thanks again :)

  • @abeyuo5748
    @abeyuo5748 3 года назад +8

    14:22 need to go to bed see ya hope this wokrs tbh

  • @connico3866
    @connico3866 4 года назад +6

    I wanna make a leader board where i can count the time (in minutes) for the people who has played. For example , if someone has played... 3500 min. it will show that everytime they join and it will keep going up for every min they spend in my game.

    • @cannoneq
      @cannoneq 4 года назад +1

      need this as well, someone tell me when the find an answer

    • @ibixo9844
      @ibixo9844 4 года назад +1

      @@genocidist2602 LMAOOo ty tho LOL

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

      @@genocidist2602 THİS İS COMEDY GOLD LMAOOO

  • @arcaneguardian5898
    @arcaneguardian5898 3 года назад +9

    The only issue I have with tutorials this complex is I don't know enough to fix it when it breaks. Mine didn't work and I had no idea what to do so had to delete it.

  • @INTERESTINGCUE6
    @INTERESTINGCUE6 4 года назад +3

    He sounds like Dennis daily

  • @Rowlerdoe
    @Rowlerdoe 4 года назад +6

    That is a lot of code but I am so glad that it worked. The only thing I would want on top of the leaderboard would be a scroll feature to look at more players than the size of the part.

    • @meowuni-949
      @meowuni-949 3 года назад

      im pretty sure you can add a ScrollingFrame and that fixes it.

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

      @@meowuni-949 i tried it theres a big gap

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

      i typed all the code and in the end it didn't work ;-;
      not even an error in the console to help me out
      edit: I had to change the names of my labels

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

    Great Tutorial. It work with one Player. Of i start in Server with 2 Players i See only one player on the Board.

  • @anonymouscrow5264
    @anonymouscrow5264 4 года назад +12

    0:34
    *Forever Alone*

    • @bdidk235
      @bdidk235 4 года назад

      this is Roblox Studio how can you have players then?

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

      @@bdidk235
      Can't you take a joke?
      PS: *r/woooooosh*

    • @lemon-oi5kl
      @lemon-oi5kl 4 года назад

      bdidhdk imagine not knowing what a joke is

  • @Obby-edits
    @Obby-edits 5 месяцев назад +1

    Wow tap in olden days

  • @notsmartnotsmart8636
    @notsmartnotsmart8636 4 года назад +4

    Please, Next Video: **EGG HACTHING SYSTEM**

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

      Thats easy lol

    • @BallChewer16
      @BallChewer16 4 года назад +1

      @@notsmartnotsmart8636 Oh sorry but you prob dont even know metatables now im off i have better stuff to do like using the convex hull algorithim in studio which is something your tiny brain will never accomplish

    • @BruhBro2006
      @BruhBro2006 4 года назад

      @@BallChewer16 He probably has a bigger brain than you.

    • @BallChewer16
      @BallChewer16 4 года назад

      LOL NO HE ISNT HE PROB USES SETAYNC GARBAGE

    • @BruhBro2006
      @BruhBro2006 4 года назад

      @@BallChewer16 Your just a kid im also a kid :) but I know when people have a bigger brain than other people

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

    thank you for helping me with my game!

  • @soccerbus26
    @soccerbus26 4 года назад +14

    Hey guys, if you are wondering if it doesn't work, you need to go to settings -> options -> and turn Studio access to API services on. There you go! (It's only if you wrote the script right)

    • @ismataraferdous4831
      @ismataraferdous4831 4 года назад

      It worked but it didn't show the highest wins it just showed someone that had 0 wins :C. You do know how to fix this right?

    • @soccerbus26
      @soccerbus26 4 года назад

      3rdOnion 3rdOnion I think he mentioned it in the video, but in case you missed it. Change: if Wins and isonLeaderboard == false then. To: if Wins > 0 and isonLeaderboard == false then.

    • @bhevrage
      @bhevrage 4 года назад

      You seem like you know what you're doing, how do I copy and paste the labels like at 6:58

    • @soccerbus26
      @soccerbus26 4 года назад

      @@bhevrage well, it is actually pretty simple. First of all, if you don’t already have your explorer open, then open it up, then you gotta select all of the labels you want to copy by holding down CTRL and clicking on each of them. Then of course, after you selected them all, do CTRL+C. That should copy it down. Then, you wanna go to the parent you want to paste the labels into, for example in the video the parent was the frame. Left click on it and find the option that says “paste”. Click on it and it should copy the labels to that frame. If there was anything wrong or if I’m wrong, please do correct me!

    • @bhevrage
      @bhevrage 4 года назад

      @@soccerbus26 Thanks, but I figured it out. I highlighted all the labels I needed, right clicked on the frame and just clicked paste

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

    Thank you so much, this content helps me!!

  • @J4Y_JP
    @J4Y_JP 3 года назад +3

    What if you want to save 2 stats? For example wins and deaths?

  • @ZeeloVR
    @ZeeloVR Год назад +6

    for some reason the gui dosnt pop up on the leaderboard, does anyone know how to fix this? I get no errors and i wrote the code exactly like he did in the video.

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

    It's telling me this, "Player is not a valid member of Frame "LeaderboardFrame" - Server - LeaderboardHandler:32" and i have no idea what to do. can anyone help me?

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

      Is your TextLabel named Player under the LeaderboardFrame? Should fix the issue

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

    Him: this isn't tooooooooooo hard
    Me: cries in not being able to copy and paste

  • @P0W3R4UL
    @P0W3R4UL 4 года назад +3

    7:39 hey this is a personal mark for me! :) I’ll do the rest tomorrow

    • @ask343
      @ask343 4 года назад

      youtube saves where you left off

    • @lorenzolinguine
      @lorenzolinguine 4 года назад

      @@ask343 not always, sometimes it breaks

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

      @@ask343 unless you pause your watch history

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

      @@TheFinalCurtains who in their right mind does that

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

    9:11 just gonna pick up where I left off tomorrow morning

  • @thisisausername8332
    @thisisausername8332 3 года назад +7

    It isnt saying any errors in the output, and it's saving. But nothing pops up on the leaderboard. I can't figure it out, if anyone knows the answer please let me know!
    Edit: I found out the Info in the Holder is not being cloned into it. I also did some print(1) tests and found out that it is only making it to line 8, wich is the line that says: for, rank Data in ipairs(CashPage) do

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

      same

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

      @thisisausername i have the same problem. what do you do to fix it

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

      Are you getting the error message:
      "Argument 1 missing or nil"
      In the output?

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

      @@DasKairo Ya how to fix it?

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

      you should redo frame creating system. and i bet you have data.Key instead of data.key (lowercase it)
      well for you here is my code but you should edit it like changing path to object names and etc.
      local DataStoreService = game:GetService('DataStoreService')
      local WinsLeaderboard = DataStoreService:GetOrderedDataStore('WinsLeaderboard41')
      local function UpdateLeaderboard()
      local success,errorMessage = pcall(function()
      local Data = WinsLeaderboard:GetSortedAsync(false,5)
      local WinsPage = Data:GetCurrentPage()
      for Rank, data in ipairs(WinsPage) do
      local UserName = game.Players:GetNameFromUserIdAsync(tonumber(data.key))
      local Name = UserName
      local Wins = data.Value
      local plr_num = 1
      for _,player in pairs(game.Players:GetPlayers()) do
      local newlb = game.ReplicatedStorage.leaderboard_frame:Clone()
      newlb.Parent = workspace.leaderboard.SurfaceGui.ScrollingFrame
      newlb.Name = tostring(plr_num)
      newlb.Rank.Text ='#'..tostring(plr_num)
      newlb.Player.Text = player.DisplayName
      newlb.Wins.Text = tostring(player:WaitForChild('leaderstats'):WaitForChild('Wins').Value)
      plr_num += 1
      end

      end
      end)
      if not success then
      print(errorMessage)
      end
      end
      while true do
      for _, Player in pairs(game.Players:GetPlayers()) do
      WinsLeaderboard:SetAsync(Player.UserId,Player.leaderstats.Wins.Value)
      end
      for _, frame in pairs(game.Workspace.leaderboard.SurfaceGui.ScrollingFrame:GetChildren()) do
      if frame:IsA('Frame') then
      frame:Destroy()
      end
      end

      UpdateLeaderboard()
      print('updated')
      wait(10)
      end

  • @killbydefalt5294
    @killbydefalt5294 4 месяца назад

    I was about to comment that it doesnt work because an error message popped up saying, "Player is not a valid member or frame, 'Leaderboardframe'" but it was because I changed the text to "Name" instead of "Player" Anyways thank you so much! this is what I needed for my game!

    • @denzil.a7874
      @denzil.a7874 2 месяца назад

      Did it work

    • @denzil.a7874
      @denzil.a7874 2 месяца назад

      Cause it works but it's not entering the second loop or like it's not getting cloned into holder in workspace

  • @АндрейХиросович
    @АндрейХиросович 4 года назад +3

    Thanks for tutorial! I make a time leaderboard!!! (With autosave)

    • @dcbiscuit2286
      @dcbiscuit2286 4 года назад

      Could you send me the script for it?

  • @salamanderstuff
    @salamanderstuff 4 года назад +3

    Him: There's nothing else on here cus.... I dont have anybody to come here.
    me: O_O
    Damn hes lonely

  • @guitarsidadi5069
    @guitarsidadi5069 4 года назад +8

    What should I do if I want another section called cash on the leaderboard

    • @paxbizzle
      @paxbizzle 4 года назад

      Guitar Sidadi pretty sure it’s the exact same thing

    • @erick599
      @erick599 4 года назад

      Yeah just name of the currency to the one you want to use

    • @ask343
      @ask343 4 года назад

      @@erick599 I did but it just added a wins section
      edit:nvm i just deleted leaderstats script

    • @erick599
      @erick599 4 года назад

      A.S.K343 Did you make another leaderboard with wins section?

    • @ask343
      @ask343 4 года назад

      @@erick599 I did so i removed the leaderstats script so it stopped making a new section

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

    *cries* easy than i thought..i didnt even know how to make a gui -cries in pain-

  • @2wr633
    @2wr633 3 года назад +4

    no one:
    me, a pro scripter who can code almost everything
    still me: Ctrl + C, Ctrl + V

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

      lol

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

      No im a pro bc i use Ctrl + A, Ctrl + C, Ctrl + V lol 😂

    • @2wr633
      @2wr633 3 года назад

      @@Purplesouley101 i use double click and click + drag so we are pro :))

    • @2ndtwoarray934
      @2ndtwoarray934 3 года назад

      Pretty same just copy some scripts

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

      hippity hoppity your code is now my property

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

    Hey, @TheDevKing I love your videos! Can you teach me how to use Social Service? (How to make a friend invite system)

  • @tmhc5723
    @tmhc5723 4 года назад +5

    Bruh U sound like Khan from the academy....

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

    thanks so much!

  • @junejulyaugustnoitsmarch
    @junejulyaugustnoitsmarch 3 года назад +4

    no error output is coming up for me however it still isnt working either. the player name, number of wins and rank isnt showing up for me.

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

      Hey, I'm having the same thing. I know it's been over a year but have you found a solution?

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

      @@eighthgosling1455 bro me toooo but IM SO CLOSE TO FINDE OUT WHAT IS WRONG AND WHEN I REPAIR THIS I TOLD U I KNOW THAT WAS 2M AGO BUT STILL I WILL HELP XDD

    • @AfonsoGKing
      @AfonsoGKing 2 месяца назад

      have you?​@@eighthgosling1455

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

    someone plz and plz help me so when i did it it did not showed my wins was only 0 but i had 100 and also it showed my name and rank but not wins

  • @dudemcsparkle8652
    @dudemcsparkle8652 4 года назад +5

    How do you get the wins though. I'm confused on that part like what do you do in order for a player to get a win.

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

      thats a different code

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

      You can use this code
      local part = script.Parent
      local canGet = true
      local function onTouch(otherPart)
      local humanoid = otherPart.Parent:FindFirstChild('Humanoid')
      if humanoid then
      local player = game.Players:FindFirstChild(otherPart.Parent.Name)
      if player and canGet then
      canGet = false
      player.leaderstats.Wins.Value = player.leaderstats.Wins.Value + 1
      wait(180)
      canGet = true
      end
      end
      end
      part.Touched:Connect(onTouch)

  • @donkiefood
    @donkiefood 4 года назад +1

    LOL i just looked up a random tutorial and it's yours! I watch shark tank. lel

  • @jackshadow1234
    @jackshadow1234 4 года назад +8

    Oh. Well thanks for telling me it doesn't save at the VERY END, i just spent a whole hour for literally nothing.

    • @tqffy
      @tqffy 4 года назад

      Just make it save by watching a video

    • @devfluffles
      @devfluffles 4 года назад +3

      He said it wouldn't save at the start. He also said he wouldn't do a data storage. Watch his data storage video. It's simple enough.

    • @joel2764
      @joel2764 4 года назад

      bruh he cant do everything for you Look up datastores follow a tutorial and boom 30 mins later it saves

    • @davidslevs
      @davidslevs 4 года назад

      It saves for me??

    • @jvayden
      @jvayden 4 года назад

      @@joel2764 not even 30 min just 5

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

    Nice Video dude! You deserve a follow and a like!

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

    Hey, If
    data.key
    and
    data.value
    aren't wokring, use
    WinsPage[rank].key
    and
    WinsPage[rank].value
    Hope this helps!

  • @jeanpierre6120
    @jeanpierre6120 4 года назад +3

    at 9.223e+18 it's doesn't work, who know why plz ?

    • @КонстантинВылко
      @КонстантинВылко 4 года назад +2

      Same problem here man.

    • @kirillfedorenko5325
      @kirillfedorenko5325 8 месяцев назад +1

      it actually makes sense
      This is the maximum value of the Double data type in Lua
      it can't go any further

    • @jeanpierre6120
      @jeanpierre6120 8 месяцев назад

      @@kirillfedorenko5325 What should i do then ? I'm still having the issue and don't know what to do...

    • @kirillfedorenko5325
      @kirillfedorenko5325 8 месяцев назад

      @@jeanpierre6120 i guess you can't do anything with this

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

    when you call someone a big fat noob, he becomes big and stomps on you

  • @MaestroDa
    @MaestroDa 3 года назад +3

    i now already spent 2 hours trying to find out why it is not updating my wins (for me clicks)

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

    this is what i was looking for thanks man ive been trying to find this for a while didnt know how to word it in the search

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

    Very good video, although I am having one trouble. It says "Argument 1 missing or nil - Server" whenever it tries to execute the print (errorMessage) line. Any recommendations to fix this?

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

    So satisfying

  • @АндрейХиросович
    @АндрейХиросович 4 года назад +4

    Players:GetNameFromUserId() failed because HTTP 404 (NotFound)

    • @chimichanga__
      @chimichanga__ 4 года назад

      Yeah I got the same thing..

    • @АндрейХиросович
      @АндрейХиросович 4 года назад +1

      I know why i have error. Because if you test game with player 1 and player 2 it local player then you got error

    • @BruhBro2006
      @BruhBro2006 4 года назад +1

      Did you activate HTTP requests? Home -> Game Settings -> Options -> Allow HTTP Requests

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

    Hello, love the video, really helpful! I was curious, is there any way to track NPC leaderstats and save those like you would any normal player?

  • @GamerPerfect
    @GamerPerfect 4 года назад +4

    Why do u have to make this the day after i figure this out lol!

  • @lovelymoon8122
    @lovelymoon8122 4 года назад +1

    I am looking for a video about how to add a board that automatically adds the players names and picture when they join the game teleporter, like if you’ve played flicker... I’m not sure how to explain it or what it’s called but if you know what I am talking about plz make a video!! 💙💙💙

  • @RiadRides
    @RiadRides 4 года назад +4

    19:50 it always happens to me XD

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

    7:43 shubashribshervish lol no offence!!!! please dont send hate :)

  • @itsnotextra
    @itsnotextra 3 года назад +4

    For all of you guys saying it is not working, make sure to check many times to look for mistakes and if you want to, make the wins part anything you want but try to make the parts that need to match- match.
    Edit: I spent 22 mins on this?! Tbh it was worth it tho

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

      I spent 5 hours trying to fix it still havent

  • @reconbeats821
    @reconbeats821 4 года назад

    Nice video keep up the GOOD WORK ;D

  • @eternxldarkness9575
    @eternxldarkness9575 4 года назад +4

    What if I already have a value and I want that to be on the leaderboard?

    • @rgby1367
      @rgby1367 4 года назад

      you learn how to change values...

    • @eternxldarkness9575
      @eternxldarkness9575 4 года назад

      @@rgby1367 But how though?

    • @rgby1367
      @rgby1367 4 года назад

      @@eternxldarkness9575 for _, player in pairs(game.Players:GetPlayers()) do
      WinsLeaderboard:SetAsync(player.UserId, player.leaderstats.Wins.Value)
      end
      change Wins.Value to yourStatName.Value

  • @FlamingoSomehow
    @FlamingoSomehow 4 года назад +1

    WAIT YOU'RE TAP? I WATCH YOUR BOOGA VIDS
    edit: ive noticed your voice and i thought somethign was weird

    • @SpyrosYT
      @SpyrosYT 4 года назад

      Flamingo Somehow what do u mean tap he is TapGameplay!?!

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

      @@SpyrosYT TapWater

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

    anyone else getting the error: "Argument 1 missing or nil" on the line "local userName = game.Players:GetNameFromUserIdAsync(tonumber(data.key))"?

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

      I get an Error Message: GetCurrencyPage is not a valid member of DataStorePages "Instance" :/

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

      ye

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

      this error occurs if your data saves contain more than just the user id, to fix this you will unfortunately need to delete all of the saves that are saved with text

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

      An example of how not to do it would be if you saved your data like this: WinsDataStore:SetAsync(player.UserId..”-wins”, player.Wins.Value), instead save it like this: WinsDataStore:SetAsync(player.UserId, player.Wins.Value)
      Hope this helps :D

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

      That error happens if your database key is something other than just the player username- Ex. "Player_2373147" instead of just "2373147"
      SOLUTION:
      DON'T: delete all of the saves.
      DO: replace the line with "local userName = game.Players:GetNameFromUserIdAsync(tonumber((data.key):match("%d+")))" This extracts just the ID.

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

    i wish i could copy n paste (also im a big fan)

  • @camden1o197
    @camden1o197 3 года назад +4

    Me confident in the beginning thinking I can do it.... it doesn’t save 👁👄👁💔

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

      I can give u the code that saves since he did not make a DataStore lol

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

      @@rusuovidiu6255 gimme

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

    Me: Trying to do this as fast as I can, looks through the comments, DANG IT! NOBODY POSTED THE SCRIPT!!
    Me after 5 seconds of the video: *looks up "Global Leaderboard" in the toolbox*

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

      Lmao

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

      Did it work?

  • @noobfactory3178
    @noobfactory3178 4 года назад +4

    Can you make a local server leaderboard please, I can’t figure out how to make it

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

      just get the players using game.Players:GetPlayers() and make a code that detects whos the highest

  • @TeamTriAttack
    @TeamTriAttack 4 года назад +1

    Slow down, and lay off the coffee lol

  • @hohimihi
    @hohimihi 4 года назад +4

    GUN TUTORIAL EEEEEEEEE!

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

    YOU SOUND LIKE TAP WATER XD

  • @cypher2226
    @cypher2226 3 года назад +4

    "its actually pretty simple"

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

      Well it's easy if you learn about it.
      Kinda like literally every other action

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

    him:
    me:

  • @eeareal
    @eeareal 4 года назад +5

    this is my script when i copied it, did i do it right
    local DataStoreService = game:GetService ("DataStoreService")
    local WinsLeaderboard = DataStoreService:GetOrderedDataStore("WinsLeaderBoard")
    local function updateLeaderboard()
    local success, errorMessage = pcall(function()
    local Data = WinsLeaderboard:GetSortedAsync(false, 5)
    local Winspage - DataGetCurrentPage()
    for rank, data in ipairs(Winspage) do
    local userName - game.Player:GetNameFromUserIdAsync(tonumber(data.key)
    local Name - userName
    local Wins = data.value
    local isOnLeaderboard = false
    for i, v in pairs(game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder:GetChildren()) do
    if v.Player.text -- Name then
    isOnLeaderboard - true
    break

    end
    end

    if Wins and isOnLeaderboard -- false then
    local newLbFrame = game.ReplicatedStorage:WaitForChild("Leaderboard Frame"):Clone()
    newLbFrame.Player.Text - Name
    newLbFrame.Wins.Text = Wins
    newLbFrame.Rank.Text = "#"..Rank
    newLbFrane.Position - UDim.new(0, 0, newLbFrame.Position.Y.Scale + (.08 * #game.Workspace.GlobalLeaderboard.LeaderboardGUI.Holder: GetChildren ()), 0)
    newLbFrame.Parent = game.Workspace.GlobalLeaderBoard.LeaderboardGUI.Holder
    end
    end
    end)
    if not success then
    print(errorMessage)
    end
    end
    while true do

    for _, Player in pairs (game.Players:GetPlayers()) do
    WinsLeaderboard:SetAsync(player.UserId , player/leaderstats.Wins.Value)
    end
    for _, frame in pairs(game.Workspace.GlobalLeaderBoard.LeaderboardGUI.Holder:GetChildren.()) do
    frame:Destroy()
    end
    end

    updateLeaderboard()
    print("Updated")

    wait(60)
    end

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

    not sure if anyone will see this now but it isnt an error but when i actually go into a server of the game not in studio the log says "Player is not a valid member of Frame "Workspace.ALL BIG TV PARTS.GlobalLeaderBoard.Completed.leaderboardgui.holder.Leaderboard Frame" when I dont even know where that part of code is. Can anyone help me out if you see this? Bc ive looked thru the code like 50 times over and what this 'error' does is only let 1 person show up on the leaderboard at a time.

  • @ieatbeef1107
    @ieatbeef1107 4 года назад +4

    6:15 starts scripting

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

    Great work however can you make a tutorial please on a script for two leader boards and how to update them. I am having difficulty in running this script for 2 leader boards in the one game that use different stats. Thanx

  • @jude1122
    @jude1122 3 года назад +7

    Anyone got this error? Player is not a valid member of Frame "LeaderboardFrame" - Server - LeaderboardHandler:32

    • @contentcentral_
      @contentcentral_ 3 года назад +3

      I had this issue too until I realized that you just have to duplicate the Rank, Player, and Wins to the LeaderboardFrame in ReplicatedStorage and It should work fine

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

      yes

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

      @@contentcentral_ I have the same issue, what do you mean by your comment? I don’t understand what you’re saying.

    • @charlie-deactivated
      @charlie-deactivated 3 года назад

      @@thomasdevelops3087 you have to change the name of the frames like he does otherwise it doesnt work

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

      @@charlie-deactivated You're pretty late :p It's been two month's and I made my own leaderboard instead

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

    Positon is a pog way of saying position

  • @circuitwave1
    @circuitwave1 4 года назад +3

    Can someone make this a model lol, I'm to busy with my game to do this

    • @greenpigeongaming4867
      @greenpigeongaming4867 4 года назад +1

      Ikr

    • @AlienChoppa
      @AlienChoppa 4 года назад +1

      But if you do this, then you're still doing your job anyways 😂😂😂 you're still adding it to your game

    • @crainzgiraffe9435
      @crainzgiraffe9435 4 года назад +4

      not too busy just too lazy

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

    Grammarly does more than just catch errors.
    With Grammarly, you can find perfect words that make your writing sharp.

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

    Player is not a valid member of Frame "LeaderBoardFrame" what should i do

  • @FNMATFY
    @FNMATFY 11 месяцев назад +2

    Why does it say:
    GlobalLeaderboard is not a valid member of Workspace "Workspace" - Server - LeaderboardHandler:42
    Did I do something wrong? there's no typo there's no mistakes too! Please help me out :(

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

      r u sure there's no typo? the script check if there's something called "GlobalLeaderBoard" inside of workspace, if there's no "GlobalLeaderBoard" it will send error

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

      I saw the same thing and when I went to check my workspace, it turns out I named it “Global Leaderboard” (with a space) instead of “ GlobalLeaderboard” (without a space)

    • @FNMATFY
      @FNMATFY 2 месяца назад

      @@fluke5173 IT FINALLY WORKS!!!
      If it's okay.. Can you make a tut of kills and deaths leader board?

    • @ctxzzzz
      @ctxzzzz День назад

      @@FNMATFY just change it
      its so easy

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

    Hello DevKing! I was hoping that you make a video on GLOBAL Leaderboards but for MOST VISITS! Can you please do it? :D

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

      It's the same thing just put a value in the player's leaderstats that adds a visit every time they join the game. Use that value instead of wins on the global leaderboard.

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

    Inefficient way of saving...

    • @EpicVideoClips101
      @EpicVideoClips101 4 года назад

      Do u have a better suggestion

    • @rodrigosimoes7103
      @rodrigosimoes7103 4 года назад

      @@EpicVideoClips101 a few.
      - avoid using a while loop for saving
      - check for limits
      - check if the saving was successful
      - reattempt if something goes wrong
      - keep a cache of player data in the server and not in the player so even if the player leaves you can save data efficiently
      And so on

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

      @@rodrigosimoes7103 is the while loop just to save? (ik there is a part where it updates the leaderboard but I'm not including that). If its only for saving the data (not including updating lb again) then it would be easier using datastore in the leaderstats script.
      Sorry for the confusion if I did any