How to keep updating the text along with the bool value?

I’m not such a great scripter, but I was trying to figure out how I can get the text to update with the value counting down. I have it for every round.

local sg = game.StarterGui:WaitForChild("ScreenGui")
local tl = sg:WaitForChild("TextLabel")
local sp = game.ServerScriptService:WaitForChild("MapChangeScript")
local v = sp:WaitForChild("RoundTime")

while true do
	tl.Text = v.Value
end

As first use playergui instead of startergui

The StarterGui stores the GUI you’re making, and it gets copied for each player.

In the Explorer menu, you can see that there’s an object under every player called PlayerGui, which is the current GUI objects that are used.

local player = game.Players.LocalPlayer

local playerGui = player.PlayerGui -- This one should be used.
local screenGui = game.StarterGui -- This one should NOT be used.

A bit hard to tell what you’re doing here from the script. Just noticing this loop will lock up the game … Make sure you always have some type of pause with loops like this.

while true do
	tl.Text = v.Value
	task.wait(1)
end

Try using GetPropertyChangedSignal() or just a changed event its much more efficient than looping in this case.

Try writing it like this:

v:GetPropertyChangedSignal("Value"):Connect(function()
      tl.Text=v.Value
end)

Also if your using a local script you cant access serverscriptservice in a local script instead create an attribute to the Workspace named RoundTime and give it a number value default is 0.Then access it in the local script through game.Workspace:GetAttribute(“RoundTime”)

The safest way I can think of making this is to have a value instance under ReplicatedStorage. Then you will need two separate scripts. The server script that edits the value and the client script(LocalScript) that detects the change and reacts to it.

So basically move the RoundTime instance inside ReplicatedStorage, and then do as follows:

--Server script when the timer changes
game.ReplicatedStorage.RoundTime.Value = newValue
--Client script that detects the change and updates the UI
local player = game.Players.LocalPlayer --the client running the local script
local playerUI = player:WaitForChild("PlayerGui")
local timerUI = playerUI:WaitForChild("ScreenGui") 

local RoundTime = game.ReplicatedStorage:WaitForChild("RoundTime")

local function updateTimerValue(val)
	timerUI.TextLabel.Text = val
end

task.spawn(updateTimerValue, RoundTime.Value) --update time once on UI load
--then update time everytime the value changes
RoundTime.Changed:Connect(updateTimerValue)

Yeah that works to better than using the loop and making it all on the client