I’ve opened sourced an old weather system of mine that i’m not using anymore. It was made a few years ago when I was an intermediate scripter.
This weather system includes almost everything you would need for a normal weather system. Here they are:
Lightning is randomly generated across the map every few seconds. If lightning does strike you, it will kill you. Lightning also spawns a fire at the point of where it hit. The fire will damage you the closer you get to it. Fires also despawn after some time.
Rain is made by a part being placed over the player’s head, with a particle emitter locally. Rain will start/end smoothly as the weather changes.
When the weather changes, the lighting, audio, and rain smoothly transition into what they need to be according to the weather. There are 2 types of lighting. Lighting for rain, and lighting for daytime. You can change these to fit your liking.
Audio is also provided, although it can be easily altered to fit your needs.
Since this was created some time ago, the code isn’t the greatest, but it works.
I have open sourced the game here. You can play to try it, or edit and save it.
Credits to sleitnick for his camera shake module!
If you have any questions or enquiries, feel free to message me on discord DataAspect#7209 or contact me through the developer forum!