BillboardGui not showing the remaining time

Hello, I’m making a obby system which when completed, the player gets rewards. Everything works except for the obby cooldown textlabel, which doesnt change at all to the countdown! this is the part of the server script:

local function updateCountdown()
	while true do
		wait(1) 
		for userId, _ in pairs(playerRewarded) do
			local plr = game.Players:GetPlayerByUserId(userId)
			if plr then
				for _, portalConfig in ipairs(ObbyModule.Portals) do
					local remainingTime = math.max(0, playerRewarded[userId] - tick())
					game.ReplicatedStorage.Remotes.UpdateCountdown:FireClient(plr, portalConfig.ObbyName, remainingTime)
				end
			end
		end
	end
end

updateCountdown()

this is my local script:

local player = game.Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local function updateCountdown(PortalName, remainingTime)
	local portal = workspace.Map.Obbies.Portals:FindFirstChild(PortalName)
	if portal then
		local billboard = portal.Touch:FindFirstChild("BillboardGui")
		local textLabel = billboard and billboard:FindFirstChild("Countdown")
		if textLabel then
			if remainingTime > 0 then
				textLabel.Text = string.format("Ready in: %02d:%02d", math.floor(remainingTime / 60), math.floor(remainingTime % 60))
			else
				textLabel.Text = "Ready to Redo obby!"
			end
		end
	end
end

ReplicatedStorage.Remotes.UpdateCountdown.OnClientEvent:Connect(updateCountdown)

Any help is greatly appreciated!

1 Like

still available if someone is down to help :+1:

The simple thing to do, would be to do a print of the received parameters and validate if what is received is what you expect:

print("RECVD", PortalName, remainingTime)

You will then know what is being sent by the server and if your subsequent if statement is going to be matched correctly. If it doesn’t print anything, then the event isn’t received by the client.