#Permanent day, constant sun rotation and visibility

1 messages · Page 1 of 1 (latest)

unkempt dagger
#

Hello!

I'm very new to creating on Roblox, I would like to make it so my place's day/night cycle is turned into a "day cycle", where the sun moves as it normally would, but without disappearing when it is "underneath" the player in the skybox and without night ever beginning.

Help is greatly appreciated!

#

I hope this is the correct place to ask for this

solar elbow
#

Asks chatgpt I did and it told everything so yeah

unkempt dagger
#

I'd prefer to not do that

#

But I'll keep it in mind if I don't find human help

slate bane
# unkempt dagger Hello! I'm very new to creating on Roblox, I would like to make it so my place...

add this script to ServerScriptStorage:

local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")

Lighting.ClockTime = 12 -- inicial hour (08:00 AM)

local speed = 0.02 -- hours per second

RunService.Heartbeat:Connect(function(dt)
Lighting.ClockTime += speed * dt
if Lighting.ClockTime >= 24 then
Lighting.ClockTime -= 24
end
end)
if Lighting.ClockTime >= 18 or Lighting.ClockTime < 6 then
Lighting.FogEnd = 100 -- noite: more fog
else
Lighting.FogEnd = 1000 -- dia: more visible
end

#

then you can change when the day starts at Lighting.ClockTime , and in local speed you change how much time will take day and night , i use 0.02 , its 10 minutes day , 10 minutes in night

#

if u want your game to start at 8am you change in Lighting.ClockTime = 8 -- inicial hour (08:00 AM)

unkempt dagger
frail sequoiaBOT
#

studio** You are now Level 1! **studio

slate bane
#

Night is darker , day is with Sun

unkempt dagger
#

I'm not going for a day/night cycle. I'm trying to make it so it's permanently day, but the sun still rotates and night never happens

slate bane
#

Uhh

unkempt dagger
#

So it'd be constantly bright, you'd just be looking at the sun move above you during day, then below

#

I hope I'm being clear with the idea

slate bane
#

yea wait a sec

#

just change for this:

local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")

-- Start the day at 12 PM (noon)
Lighting.ClockTime = 12

local speed = 0.02 -- hours advanced per second

-- Optional: lock lighting to always appear as day
Lighting.Brightness = 2
Lighting.Ambient = Color3.new(1, 1, 1)
Lighting.OutdoorAmbient = Color3.new(1, 1, 1)
Lighting.FogEnd = 1000
Lighting.GlobalShadows = true

RunService.Heartbeat:Connect(function(dt)
-- Advance time
Lighting.ClockTime += speed * dt
if Lighting.ClockTime >= 24 then
Lighting.ClockTime -= 24
end

-- Keep visual lighting fixed for daylight
Lighting.Brightness = 2
Lighting.Ambient = Color3.new(1, 1, 1)
Lighting.OutdoorAmbient = Color3.new(1, 1, 1)
Lighting.FogEnd = 1000

end)

#

same thing but always with the day light

#

i think that works

#

im using cycle but idk

#

change the local speed to 1 and see if it works

unkempt dagger
#

Mostly looks like a regular day/night cycle

slate bane
#

Strange , try this

slate bane
#

Oh nevermind sun will not move like that i guess

#

Im not too good at this sorry

#

Lua is still a little nightmare for me

unkempt dagger
#

Don't worry about it, I appreciate the help. It might just be a roblox limitation where it's impossible to remove night time if you want a cycle

slate bane
#

Nah i think theres a lot of games that never have night i guess

#

For example Tycoons i think they dont have Night

unkempt dagger
#

But their sun moves?

#

It's easy to not have night if you just lock the time to day

slate bane
unkempt dagger
#

I'd be surprised

#

I'll just stick to permanent day via keeping time locked until someone hopefully presents a solution

#

Would really like to get it to work

#

I know 0 about lua so I'm fully in the hands of the wizards haha

hushed epoch
#

maybe go ask chatgpt then

#

saves everyone else time

#

¯_(ツ)_/¯