Rain Module + Plugin

So, I’m assuming I either have to edit the particle’s size, or edit the code in order to make it not sink into the ground?

There’s several ways:

  • Reduce falling speed slightly so there is less clipping with ground surfaces, at risk of particles not reaching the ground in some situations, and reducing the speed too far might break the illusion of the rain because rain typically falls very fast.
  • Reduce lifetime slightly so rain particles disappear faster but still fall at the same speed, at risk of particles not reaching the ground but this should be less likely to break the illusion of the effect.
  • Reduce particle size slightly so there is less clippage, but this is unlikely to lead to good results in most situations, because you immediately notice the quality of the effect drop when the rain sheets are less dense.

cc @IdontPlayz343 If you can’t find the right values through the plugin sliders (if you are using the plugin), you can find the module constants to tweak here: Rain/Rain.lua at 34b5379679ca6233595e92793fb84b69f357a6ae · buildthomas/Rain · GitHub

5 Likes

It’s a great plugin and all, but I’d love to see another system next to it, that gives snow also, cause I can’t seem to find any good snow textures to change the rain out with.

1 Like

Currently experiencing a problem where the rain doesn’t load in upon respawning. Hoping that this can be fixed.

To give an elaboration, the rain particles are removed from the camera the moment the player respawns. They are removed from the particle emitter.

I will try to fix this for myself, but just in case I can’t, I would greatly appreciate some kind of solution to this.

Can you post a minimal repro file (.rbxl) that shows the issue occurring with clear instructions? Thanks in advance!

1 Like

I’ll send one over. I used a system that makes the rain occur at random intervals, and I did some investigating before posting and found that the problem occurred in the plug-in as well.

Upon joining into the game on the .rbxl file, reset your character. This will likely provide a consistent stream of errors, like so.

Here is the .rbxl file, it includes the model I used, without the fixes I made to the sounds for it.

Error.rbxl (60.3 KB)

Your repro file does not work for me:
https://imgur.com/KmiMSsX

It is likely user error (e.g. a mistake in your code base somewhere other than the module, or some other module is interfering), since it does not reproduce for me when using the module in a place of my own.

Feel free to send over a clearer repro file if you believe there still is an issue.

If you can’t find the issue, I recommend troubleshooting with the help of the community in #help-and-feedback:scripting-support .

1 Like

I spent the last hour or so reuploading all the sounds that I uploaded to my account so I could use them in my group game and the sound effect in this plugin is the last sound I have to convert

Is it possible to upload the rain sound effect so we can upload it to Roblox or shall we look for our own rain sound effects?

Saw the announcement and I’m working on it – trying to find out if the Roblox account has some rain sound loop uploaded. Someone at Roblox implied that there should be one since they uploaded a bunch of professional SFX/loops.

If you want a short-term fix yeah just go ahead and take the MP3 from the asset and reupload it, I give anyone permission to reuse the sound freely.

3 Likes

To extend, here is a rain loop (titled “Rain loop” under search for “rain”) I found on MixKit that is decently similar for anyone who needs a quick solution right now and cannot wait for roblox to upload more SFX, or cannot obtain the original sound. The license is here, and as far as I understand you should be allowed to use it in your Roblox experiences, heeding some limitations on distribution.

Can’t link to it on the website because there is no dedicated page unfortunately, so here it simply is converted to ogg for ease of use.

4 Likes

Small update: I’m reaching out to a Roblox contact if they can keep this sound from becoming private, since this is a unique situation as it’s used by potentially 150,000 developers (number of downloads on the plugin).

No guarantees this will happen so I recommend everyone to use the sound above if you think you cannot wait / risk it.

7 Likes

The rain effect that this plugin uses has been transferred to the Roblox account. :tada: Thanks to Roblox staff for the assistance here to make sure the 150k people using this plugin are not interrupted.

https://www.roblox.com/library/1516791621/Rain-Effect
image

The ID of the sound has stayed the same, so you should be able to continue using this plugin / this sound without manually reuploading it yourself.

Thanks everyone for your patience.

cc @wish_z

7 Likes

Thanks MokiyRBX for commiting a change to set FacingCameraWorldUp on the rain particles to make them appear more realistic when viewing at a diagonal angle respective to the rain direction:

Before:

After:

Pull request:

The module in this thread, the module on Roblox, and the plugin have been updated accordingly.

3 Likes

Hi there, just wanted to give you a heads up—The rain sound effect that you have in the module no longer works due to the audio update.

2 Likes

read again -.-

1 Like

It didn’t work, even though it was owned by Roblox. It looks like the issue has been resolved.

I have not made any changes in the past 3 weeks, so this was likely either user error or Roblox was having issues with audio permissions that they resolved. Glad to hear it’s fixed.

2 Likes

Hello, I have a problem with your plugin, when I want to set enable to true this does not work ! :thinking:
Here my script :

spawn(function()
	while wait() do
		if Time == "12:00:00" then
			if Summer then
				if math.random(0,5) < 5 then
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(0,50)/100
					Clouds.Color = Color3.new(1, 1, 1)
					game.Lighting.Brightness = 6
				else
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(50,75)
					Clouds.Color = Color3.new(1, 1, 1)
					game.Lighting.Brightness = 6
				end
			elseif Autumn then
				if math.random(0,2) == 1 then
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(50,100)/100
					Clouds.Color = Color3.new(0.713725, 0.713725, 0.713725)
					game.Lighting.Brightness = 4
					if math.random(0,10) == 1 and Clouds.Cover > 0.9 then
						game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = false
						Clouds.Color = Color3.new(0.458824, 0.458824, 0.458824)
						game.Lighting.Brightness = 2
					end
				elseif math.random(0,5) == 1 then
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(0,50)/100
					Clouds.Color = Color3.new(0.882353, 0.882353, 0.882353)
					game.Lighting.Brightness = 4
				else
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(0,25)/100
					Clouds.Color = Color3.new(1, 1, 1)
					game.Lighting.Brightness = 6
				end
			elseif Winter then
				if math.random(0,3) < 3 then
					if math.random(0,3) < 3 then
						game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = false
						Clouds.Cover = math.random(90,100)/100
						Clouds.Color = Color3.new(0.45098, 0.45098, 0.45098)
						game.Lighting.Brightness = 2
					else
						game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
						Clouds.Cover = math.random(90,100)/100
						Clouds.Color = Color3.new(0.45098, 0.45098, 0.45098)
						game.Lighting.Brightness = 2
					end	
				else
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(70,90)/100
					Clouds.Color = Color3.new(0.619608, 0.619608, 0.619608)
					game.Lighting.Brightness = 4
				end
			elseif Spring then
				if math.random(0,5) < 3 then
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(30,70)/100
					Clouds.Color = Color3.new(1, 1, 1)
					game.Lighting.Brightness = 6
				elseif math.random(0,5) < 5 then
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(70,90)/100
					Clouds.Color = Color3.new(0.619608, 0.619608, 0.619608)
					game.Lighting.Brightness = 4
				else
					game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = true
					Clouds.Cover = math.random(90,100)/100
					Clouds.Color = Color3.new(0.45098, 0.45098, 0.45098)
					game.Lighting.Brightness = 2
					if math.random(0,4) == 1 then
						game.StarterPlayer.StarterPlayerScripts.RainScript.Disabled = false
					end
				end
			end
		end
	end
end)

StarterPlayerScripts is a container that is used as the source for player scripts whenever someone joins the game. The scripts are copied over from there to each player’s PlayerScripts on join and then don’t receive any further changes. You should avoid editing StarterPlayerScripts at run-time for that reason.

Also, run-time changing the Disabled property of the script is not going to have the desired effect. Please use the API of the Rain module for this instead. (require the module and call the respective API, see the documentation)

If you need help with server-to-client interactions like this to disable the rain script, please start a thread in #help-and-feedback:scripting-support , it’s not on-topic here because it’s outside of the scope of the module.

4 Likes

Thank you, I corrected my mistake ! :yum:

2 Likes