A modular, server-authoritative global weather system for Roblox, designed to be clean, performant, and GitHub/Rojo-friendly.
Weather behavior is fully data-driven through per-weather modules (Weathers/<weather>/init), with client-side visuals and server-side control. Drop it into your game or sync it via Rojo β no manual setup required.
π Roblox Creator Store (Studio Model): https://create.roblox.com/store/asset/110281205103235/WeatherService
-
π Global weather (one weather shared across the entire server)
-
π§ Server-authoritative weather selection and timing
-
π² Chance-based weather picking (
chance = {numerator, denominator}) -
π Automatic cycling with configurable duration per weather
-
π¨ Client-side visuals
- Lighting transitions (Atmosphere, ColorCorrection, DOF, etc.)
- Player-attached particles
- Music & ambience with smooth crossfades
-
π Fully modular weather definitions
- Each weather lives in its own folder
- Assets colocated with logic
-
π§© Plug-and-play
- Automatically installs itself on game start
- Creates required RemoteEvents at runtime
WeatherService/
ββ Init.server.lua
ββ WeatherService.lua
ββ WeatherSystem/
β ββ Shared/
β β ββ Config.lua
β β ββ Types.lua
β β ββ WeatherLoader.lua
β β ββ WeightedPicker.lua
β ββ WeatherStateEvent (RemoteEvent)
β ββ Client/
β β ββ ClientRunner.client.lua
β β ββ WeatherClient.lua
β ββ Weathers/
β ββ rain/
β β ββ init.luau
β β ββ Particles/
β ββ snow/
β ββ blizzard/
Each weather lives in its own folder under WeatherService/WeatherSystem/Weathers/.
--!strict
return {
id = "snow",
display_name = "Snow",
chance = {1, 12}, -- 1 in 12 chance
length = 90,
music = {
id = "rbxassetid://1234567890",
volume = 0.6
},
ambience = {
id = "rbxassetid://2345678901",
volume = 0.35
},
lighting = {
Atmosphere = {
Density = 0.35,
Haze = 0.4
},
ColorCorrectionEffect = {
Saturation = -0.05,
Contrast = 0.02
},
},
}Under the module instance:
Particles/βParticleEmitters cloned onto the player
Global settings live in:
WeatherService/WeatherSystem/Shared/Config.lua
Includes:
- Lighting & audio transition time
- Server tick rate
- Broadcast interval
- Default music & ambience volume
-
Server
- Loads all weather definitions
- Computes weights from chance fractions
- Chooses and times weather
- Replicates a single
WeatherStateto clients
-
Client
- Applies lighting tweens
- Spawns particles on the player
- Crossfades music & ambience
- Handles respawns and late joins cleanly