Загрузка страницы

How to add a Day Night Cycle in Roblox Studio with Code (Beginner Friendly Tutorial)

Learn how to script, code, program, and develop a day night cycle feature to add to your game in Roblox Studio that is compatible with PC, Mobile, and XBOX devices.

#chrisatm #roblox #robloxdev

Code (Script in ServerScriptService):

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

local function updateTime()
local currentTime = Lighting.ClockTime
local timeInterval = 0.1
local newTime = currentTime + timeInterval
Lighting.ClockTime = newTime
end

RunService.Heartbeat:Connect(updateTime)

Видео How to add a Day Night Cycle in Roblox Studio with Code (Beginner Friendly Tutorial) канала Chrisandthemike
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
23 августа 2022 г. 2:20:04
00:00:58
Яндекс.Метрика