Day/Night Cycle isn't working

I want a simple day night cycle lmao.

The issue is that for every script I have tried, nothing works on moving the sun. It isn’t turning day or night-

Here is an example:

YouTube video of my error

My Lighting Properties:

My Explorer:

Screen Shot 2021-05-27 at 4.22.46 PM

My Code:

The code is inside ServerScriptService

local lighting = game:GetService("Lighting")

local minutes = 7 * 60

while wait() do
	minutes = minutes + 1

Please help, I have been trying to solve this for a while now :expressionless:

Perhaps something else is causing the issue? I ran the given code in a new place and it worked just fine.

I just tested your code in an empty baseplate and it works fine

I searched “lighting” and I found an “AutoLighting” property in another script of mine that was enabled. I disabled it and now it works fine. Finally lmao.

I also tried out the code and it worked all fine. Might be because of a different script inside your game that’s causing this.

Yeah that was the problem. I disabled another script and now it works perfectly. Thanks!