How to make a block that turns on at night and turns off during the day?

Hello, I will be simple and clear, I want to know how to make a block that turns on at night and turns off during the day as in Jailbreak for example in a city
I say this because I want my city to have that functionality

(My city)

I will be grateful with a solution
Thanks for reading

- murjarquitecto :roblox:

3 Likes

You of course will need to use a bit of scripting to accomplish this.

There is already a video on the Roblox YouTube channel, that is devoted to this.

It shows you how you can create a streetlight, that is only active at night.

Basically, you can monitor the time of day, using game.Lighting:GetMinutesAfterMidnight(), and set the .Material and optional PointLight accordingly.

3 Likes

Thanks, I didn’t know that video existed :wink:

3 Likes