You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear! I’m Making A Working Clock.
-
What is the issue? Include screenshots / videos if possible! It Errors Saying “attempt to concatenate string with nil”
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? Yes But None Have The Same Type.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
ServerScript:
local OClock = "AM"
local TimeBetweenMinutes = 30
local TimeNow = StartingTime
local ChangeUITimer = game.ReplicatedStorage.RemoteEvents.ChangeUITimer
function Hour()
if TimeNow == 13 and OClock == "AM" then
OClock = "PM"
TimeNow = 1
elseif TimeNow == 13 and OClock == "PM" then
OClock = "AM"
TimeNow = 8
end
ChangeUITimer:FireAllClients(TimeNow, OClock)
TimeNow = TimeNow + 1
end
while true do
Hour()
wait(2)
end
Local Script:
game.ReplicatedStorage.RemoteEvents.ChangeUITimer.OnClientEvent:Connect(function(player, TimeNow, Oclock)
script.Parent:WaitForChild("GameTime").Text = TimeNow .. ":00" .. Oclock
end)
Help As This Is Important For My Game…