TimeValue = Instance.new("NumberValue")
while true do
local PlayerGui = game.Players.LocalPlayer.PlayerGui
local TextLabel = PlayerGui.ScreenGui.TextLabel
if game:GetService("Lighting").ClockTime >= 14 then
TimeValue = 6
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 15 then
TimeValue = 7
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 16 then
TimeValue = 8
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 16.5 then
TimeValue = 9
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 16.8 then
TimeValue = 10
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 16.8 then
TimeValue = 10
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 17 then
TimeValue = 11
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "AM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 17.5 then
TimeValue = 12
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 17.8 then
TimeValue = 1
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 18 then
TimeValue = 2
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 18.5 then
TimeValue = 3
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 18.7 then
TimeValue = 4
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 18.9 then
TimeValue = 5
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
if game:GetService("Lighting").ClockTime >= 19 then
TimeValue = 6
TextLabel.Text = "Time:".. TimeValue.Value..":00".. "PM" .. "[Day Shift]"
end
end
20:47:13.183 - Players.jkiop23.PlayerGui.ScreenGui.TextLabel.LocalScript:11: attempt to index global 'TimeValue' (a number value)
this was the error

13 comments
can you format your script into a code block?
tell me which button that is?
anddddd also post the error
it is on line 11
i mean copy what the error says and post it
i did
you didnt parent your TimeValue. the TimeValue must be parented. In line one change it to Instance.new("NumberValue", game.Lighting)
thanks man
np
it still says the same error
Technically you dont need that long of a code. Nor do you need a time value. Let me show you some revised code
please do
script revised