How to create a leadarboard that can read data with datastore?
Asked by
4 years ago Edited 4 years ago
I am trying to create a leaderboard and im trying to use datastore but it forgot how to use it.
here is the script
*database script at line 32
03 | local Assets = script.Parent |
07 | local Player 1 = Assets.Player 1 |
08 | local P 1 Shirt = Assets.Player 1. Shirt |
09 | local P 1 Pants = Assets.Player 1. Pants |
10 | local P 1 Name = Assets.Player 1 Box.SurfaceGui.PlayerName.Text |
14 | local Player 2 = script.Parent.Player 2 |
15 | local P 2 Shirt = Player 2. Shirt |
16 | local P 2 Pants = Player 2. Pants |
17 | local P 2 Name = Assets.Player 2 Box.SurfaceGui.PlayerName.Text |
21 | local Player 3 = script.Parent.Player 3 |
22 | local P 3 Shift = Player 3. Shirt |
23 | local P 3 Pants = Player 3. Pants |
24 | local P 3 Name = Assets.Player 3 Box.SurfaceGui.PlayerName.Text |
28 | local Face 1 = script.Parent.Player 1. Head.face.Texture |
29 | local Face 2 = script.Parent.Player 2. Head.face.Texture |
30 | local Face 3 = script.Parent.Player 3. Head.face.Texture |
32 | local DataStore = game:GetService( "DataStoreService" ) |
Also how do you count the accesories on a player? or just a number of a specific type of object in a parent.
This is my script so far
local NumberOfaccesories = game.Players.LocalPlayer.Character