Leaderboard script - no error

See solution, this was solved. Problem was Value, it was to be written value.

Hey! I’m working on a script for leaderboards. It worked perfectly for me but it’s not working since I added a time thing which shows days/hours/minutes instead of 00:00:00.

local Leaderboard = game:GetService("DataStoreService"):GetOrderedDataStore("RCTime")

local function updateLeaderboard()
	local success, errorMessage = pcall (function()
		local Data = Leaderboard:GetSortedAsync(false, 100)
		local Page = Data:GetCurrentPage()
		for Rank, data in ipairs(Page) do
			local Name = game.Players:GetNameFromUserIdAsync(tonumber(data.key))
			local gt = data.Value
			local isOnLeaderboard = false
			for i, v in pairs(script.Parent.GlobalLBGui.Holder:GetChildren()) do
				if v.Player.Text == Name then
					isOnLeaderboard = true
					break
				end
			end

			if gt and isOnLeaderboard == false then
				local newLbFrame = script.Parent:WaitForChild("Template"):Clone()
				newLbFrame.Player.Text = Name
				local Text = math.floor(gt / 1440).." days"
				if Text=="0 days" then Text = math.floor((gt / 60) % 24).." hours"
					if Text=="0 hours" then	Text = math.floor((gt % 60)).." min"end
				end

				newLbFrame.Value.Text = Text
				newLbFrame.Rank.Text = "#"..Rank
				newLbFrame.Position = UDim2.new(0, 0, newLbFrame.Position.Y.Scale + (.008 * #script.Parent.GlobalLBGui.Holder:GetChildren()), 0)
				newLbFrame.Parent = script.Parent.GlobalLBGui.Holder
			end
		end
	end)

	if not success then
		print(errorMessage)
	end
end

while true do
	for _, v in pairs(game.Players:GetPlayers()) do
		Leaderboard:SetAsync(v.UserId, game.ServerStorage.PlayerData[v.UserId].Time.Value)
	end
	for _, frame in pairs (script.Parent.GlobalLBGui.Holder:GetChildren()) do
		frame:Destroy()
	end
	updateLeaderboard()
	wait(60)
end

This ain’t doing anything. No errors. It used to work earlier. Please help me :pleading_face:

If there are no errors, then add some prints after your if statements to confirm that the conditions you expect to be met, are actually being met.

I compared this script to my earlier script and found that I had put gt.Value instead of gt.value. I thought value would be deprecated but it’s not for some reason.