TextLabel is not showing more than 9

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)

image

image

1 Like

Can you show me the leaderboard?

1 Like

image

Its not a leaderboard on the PlayerListGui

2 Likes

Is the text set to textscaled? It’s probably just because it doesn’t have room to show multi digit numbers.

2 Likes

So it was textScaled on, I turned it off, made the part bigger and made the textSize smaller and still doesn’t work

2 Likes

Just saw that you were comparing a string with a string and checking which one is biggest. tostring(value) > Counter.T1.Text

That’s not going to get you the right result as it compares them alphabetically.

2 Likes

So should I make value > tonumber(Counter.T1.Text) ?

2 Likes

Yep and that should fix your issue

2 Likes

is the maxvisiblegraphemes -1 on the textlables

1 Like

Omg yeah your right. That makes sense. Thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.