Argument 1 missing or nil on LeaderBoard?
Heres the code :
01 | local datastore = game:GetService( "DataStoreService" ):GetOrderedDataStore( "Time" ) |
04 | local success, errormessage = pcall ( function () |
05 | local data = datastore:GetSortedAsync( false , 100 ) |
06 | local timepage = data:GetCurrentPage() |
07 | for rank,data in ipairs (timepage) do |
08 | local username = game.Players:GetUserIdFromNameAsync(data.Key) |
10 | local timee = data.Value |
12 | for i, v in pairs (workspace.LB.SurfaceGui.Container.ScrollingFrame:GetChildren()) do |
13 | if v.User.Text = = name then |
18 | if timee and isonlb = = false then |
19 | local newlbfrm = game.ReplicatedStorage:WaitForChild( "PlaceHolder" ):Clone() |
20 | newlbfrm.User.Text = name |
21 | newlbfrm.Time.Text = timee |
22 | newlbfrm.Number.Text = "#" ..rank |
23 | newlbfrm.Position = UDim 2. new( 0 , 0 , newlbfrm.Position.Y.Scale + (. 08 * #workspace.LB.SurfaceGui.Container.ScrollingFrame:GetChildren()), 0 ) |
24 | newlbfrm.Parent = workspace.LB.SurfaceGui.Container.ScrollingFrame |
34 | for _, frame in pairs (workspace.LB.SurfaceGui.Container.ScrollingFrame:GetChildren()) do |
It warns me in the output "Argument 1 missing or nil" I scanned it 3 times and nothing.