Hi guys!
So I have a very very weird problem here.
I am trying to do a Leaderboard for the top 5 play times.
My problem is, that my TextLabel, when you get a position on the Leaderboard, just wont show more than 9! Print commands are still working…
It’s a script located in ServerScriptService.
The Leaderboard is in the Workspace.
Here’s the script:
local LB = game.Workspace:FindFirstChild("Leaderboard")
local Counter = LB.Counter.SurfaceGui
local Names = LB.Names.SurfaceGui
local rep = game:GetService("ReplicatedStorage")
value = 0
game.Players.PlayerAdded:Connect(function(plr)
local IValue = Instance.new("IntValue")
IValue.Name = "LValue"
IValue.Parent = plr
IValue.Value = 0
value = IValue.Value
while wait(2) do
for i, v in pairs(game.Players:GetPlayers()) do
value = value + 1
print(value)
print(Counter.T1.Text)
if tostring(value) > Counter.T1.Text then
Counter.T1.Text = tostring(value) + 1
Names.T1.Text = plr.Name
end
end
end
end)