Well I've made a script, where the Server sends the time of lighting to Client. The Clientside script seems to work fine, but a error in the Output pops up the whole time.
22:06:24.160 - Players.bbudder.PlayerGui.CS.Main.TimeModule [FE]:6: attempt to concatenate local 'STime' (a nil value)
22:06:24.162 - Stack Begin
22:06:24.163 - Script 'Players.bbudder.PlayerGui.CS.Main.TimeModule [FE]', Line 6
22:06:24.164 - Stack End
Clientside:
local CoreGui = game.Players.LocalPlayer.PlayerGui
local Time = CoreGui.CS.Main.TimeDisplay
local Event = game.ReplicatedStorage.ServerTime
Event.OnClientEvent:Connect(function(STime)
Time.Text = ""..STime
end)
Serverside:
local Event = game.ReplicatedStorage.ServerTime
while true do
wait(1)
local STime = game.Lighting.TimeOfDay
Event:FireAllClients(STime)
end
Any answers would be appreciated. How can I avoid this?
++EDIT Even if I replace / Time.Text = ""..STime / with /Time.Text = STime / then this message pops up:
22:23:16.810 - Players.bbudder.PlayerGui.CS.Main.TimeModule [FE]:6: bad argument #3 to > 'Text' (string expected, got nil)

7 comments
Try Time.Text = STime
Sorry does not. If I do that then the error message is diffrent: 22:20:10.230 - Players.bbudder.PlayerGui.CS.Main.TimeModule [FE]:6: bad argument #3 to 'Text' (string expected, got nil)
*Sorry does not work
Try tostring(STime)
It think without tostring, it would be like (for example) 12:34:56, which should be "12:34:56".
Time.Text = tostring(STime)
The error is gone, But instead of the time appearing. It's just displaying "nil" in the text.