How to make time changing textbox?

Hi, welcome. Today, I scripting my time changing textbox, but it doesn’t work. So, let me show the local script:

local ClockTime = game.Lighting.ClockTime
local TextBox = script.Parent

-- Default Script
while true do
	TextBox.Text = ClockTime
end

-- Changing Script
local function onFocusLost (enterPressed, InputObject)
	if enterPressed then
		TextBox.Text = ClockTime
	end
end

TextBox.FocusLost:Connect(onFocusLost)

So, I also make just GUI time changing text box and look functional:

It does not work for no reason. So, how can I script the text box correctly?

Try a remote event which communicates between the server, and set up a serverscript to change it. As changing it by client will only show the change on the player, not for anyone else, if you want it to be visible for everyone else

Yes, sym. But I really much set to the value and client after.

No, It doesn’t work either. I try creating remote event and the number value, but it’s an error. But why server script service?