Is there a way of only doing it client side , because you might want players to trigger different areas of the map , like biomes mountains , swamps amd such , and other players that are in other area do not need the effects
Heyo! Not sure what exactly you’re trying to use this module for, but I just made a script that will randomly change the weather every 10 seconds. Maybe this’ll help your issue?
Script in ServerScriptService
local WeatherModule = require(game.ReplicatedStorage.WeatherModule) --<Module script in the package
local Types = {
"Sunny",
"Rainy",
"Foggy",
"Foggy_WithRain",
"Thunderstorm",
"Cloudy",
"Snowy",
"BloodMoon",
"Windy",
"HeavyRain"
}
local function getRandomWeatherType()
local randomIndex = math.random(1, #Types)
return Types[randomIndex]
end
while task.wait(10) do
local randomWeather = getRandomWeatherType()
print("Random Weather Type: " .. randomWeather)
WeatherModule.ChangeWeather(randomWeather)
end
And if you’re able to make your own weather type you can add it to the “Types” table!
Perfect, thanks a ton!
Now I have to figure out how to make a little GUI that shows the weather and time, and make commands that let you change it, etc… but I recently got a programmer on my team so hopefully it won’t be too hard.
Note: Also need to find a way to prevent fog and such from existing within the spawn area, as it prevents players from customizing their character… oof.