I am trying to make a day/night cycle, and I’m trying to change an intvalue in the ReplicatedStorage. However, it’s not working.
The script:
local timevalue = game:GetService('ReplicatedStorage').TimeOfDay.Value
while true do
if timevalue < 24 then
print('timeup')
timevalue = timevalue + 1
else
timevalue = 0
end
wait(1)
end
If anyone knows how to fix this, please respond, Thank you.