|
| 23 Mar 2014 03:44 PM |
I want to do it on an inbuilt point/rank system : 1.Obtain data store of leaderboard points 2.Find top 3 10 people and place them on a Top 10 ranked leaderboard. I am using the roblox wiki to help and I have this script : =============================================================================== local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")
function updateBoard(board, data) for k,v in pairs(data) do local pos = k local name = v.key local score = v.value local nametextbox = board.SurfaceGui:FindFirstChild("Name" .. pos) nametextbox.Text = name local scoretextbox = board.SurfaceGui:FindFirstChild("Score" .. pos) scoretextbox.Text = score end end
while true do local pages = ods:GetSortedAsync(false, 5) local data = pages:GetCurrentPage() updateBoard(game.Workspace.Top5ScoreBoard, data) if not pages.IsFinished then pages:AdvanceToNextPageAsync() data = pages:GetCurrentPage() updateBoard(game.Workspace.Next5ScoreBoard, data) end wait(.1) end ================================================================================ But how do I implement this on my own point value instead of a "HighScore". |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 03:45 PM |
Sorry 2.Find top 3 10 people and place them on a Top 10 ranked leaderboard. What I meant : 2.Find top 10 people and place them on a Top 10 ranked leaderboard. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 03:45 PM |
| http://wiki.roblox.com/index.php?title=Data_store |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 03:47 PM |
| I read it. I get the "MAIN" part of it but I am confused on how to implement it on my own stat. And anyways... wrong link. You mean http://wiki.roblox.com/index.php?title=Ordered_data_store |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Mar 2014 04:00 PM |
| How do I implement this on my own point value instead of a "HighScore"? Answer that and ill be fine. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 04:02 PM |
| BUMP!!!!!! For the last time u.u |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 04:05 PM |
Possible change:
local ods = game:GetService("DataStoreService"):GetOrderedDataStore("HighScore")
Section:
:GetOrderedDataStore("HighScore")
to your own stat:
:GetOrderedDataStore("VALUEHERE") |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Mar 2014 04:12 PM |
To visualize what this script is really trying to do, see its origins here : http://www.roblox.com/Ordered-Datastore-Example-place?id=147985142 The wiki's physical version of Ordered Data Store. I want this script to work for my Rank and not be accumulated by a button and an increment in points. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 04:14 PM |
Also What I am trying to understand is how does the script even work when it is refering to : ================================================================================== local nametextbox = board.SurfaceGui:FindFirstChild("Name" .. pos) nametextbox.Text = name local scoretextbox = board.SurfaceGui:FindFirstChild("Score" .. pos) ================================================================================== Where is say board.Surface That isn't the name of the brick of the leaderboard. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2014 04:15 PM |
| Well I gtg Ill sleep over this and bump it in the morning if it isn't answered. Bye! |
|
|
| Report Abuse |
|
|
|
| 24 Mar 2014 11:26 AM |
That isn't the last bump I will do because someone actually bothered to answered so..... BUMP!
|
|
|
| Report Abuse |
|
|
|
| 24 Mar 2014 11:31 AM |
All I want to know is how to implement that into a leaderboard?
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 28 Mar 2014 04:59 PM |
| Ugh guess not that many people know about data stores or ordered data stores then :/ |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Mar 2014 03:16 AM |
| Come on guys help me here. If you don't know then ideas??? suggestions??? I am really lost... I want to make a global leaderboard but it doesn't show anything??? what am I doing wrong? |
|
|
| Report Abuse |
|
|
| |
|
|
| 29 Mar 2014 07:33 AM |
| I have yet to see anyone have any idea about Data Stores on this forum. |
|
|
| Report Abuse |
|
|
|
| 29 Mar 2014 03:27 PM |
| I actually understand them well. I understand this problem better as well so I posted a new Forum Thread for help. |
|
|
| Report Abuse |
|
|
spyclub65
|
  |
| Joined: 14 Jan 2010 |
| Total Posts: 22 |
|
|
| 02 Jun 2014 03:32 PM |
Have you tried the "Replace" button? You should put:
Find What: HighScore Replace With: YourValue
then click "replace all" |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2014 03:53 PM |
| I have no idea how to save 1 peice of data yet |
|
|
| Report Abuse |
|
|