Lighting script doesn't update with change in time

That makes sense. Scripts shouldn’t run if they’re in the ReplicatedStorage service.

Script types and locations | Documentation - Roblox Creator Hub