Rain Module + Plugin

So all these values under the script take no effect whatsoever? They’re just references?

image

Whether the plugin is enabled or not, the “TransparencyConstraint” is still true, which means it should obey transparent parts according to your code. (Yes, the script is under my player scripts folder as you can see.)

I’ll try setting the options manually then I suppose. I’ll post back if the issue persists.

No, they’re not just for reference.

The “Rain” is the separate module you can download and use in your own code.

The “RainScript” and the value objects are what the plugin inserts above the “Rain” module to communicate the values to the “Rain” module. The “RainScript” is the one that reads the value objects and forwards them to the relevant API of “Rain”. So if “RainScript” is disabled, these properties are not communicated to the “Rain” module.

As above, please either use the plugin or the module in your game, not a combination of the two.

2 Likes

Okay I’ll just switch to using the module from now on since the Plugin doesn’t work for any of my use cases. Hopefully that prevents this issue.

Personally if I wrote this, I would make it so it would work either way, but I can see where you’re coming from with either using the Plugin or your own separate script.

Wish you luck on future projects.

This issue should be resolved now.

2 Likes

Hi, um I was just wondering. On accident when I downloaded the plugin it asked if it would be able to make changes to scripts. I pressed No, and no matter how many times I redownload the plugin I can’t seem to make it work when in preview and also when in-game.
If you have a solution to my problem that would help me very much as your plugin looks really good and would tie my game’s atmosphere together.
Thanks

In File > Advanced > Manage Plugins, it should show something like this:

image

Instead of “Script Injection Allowed”, it’ll say “Script Injection Denied” for you currently. Just hit the small edit icon next to it and it should allow you to toggle the permission.

1 Like

Is there a way to trigger the rain via script?

This has been asked/answered many times throughout the topic – read up!

1 Like

I did not notice that. Sorry lol.

Quick Question. If I wanted all objects with collisions on to block the rain would I do this?

Rain:SetCollisionMode(RainModule.CollisionMode.None)


A weird bug? Roofs don’t completely seal up the rain effect for me. I’ve tested this in my main game and a separate place. (Keep in mind I am using the default settings. I’ve seen you say to “change the constants”, but you have to be more specific on what constants you want us to change. Plus I used the default settings. I tried to make it so while you’re under a roof, the rain stuff becomes invis, but ofc that wouldn’t work.

Edit: I don’t think I have to send the rbx file here, as you can simply do this with just inserting the plugin and turning on .Enabled. For reference, the roof is ~11 studs on the Y axis. If you’d like, I can provide a more clear image of the issue.

Edit 2: Playing around with it a bit more, the rain only stopped coming in completely after my roof’s Y is 33 studs! It’s absurd how high the roof has to be in order for the rain to stop seeping in. And frankly, you shouldn’t be told to change the constants on the code, as you advertised it as “working out of the box”.

I’m sorry if I sound very aggressive, I’m just amazed on how much the roof has to be in order for rain to stop seeping in, really sorry if my tone sounds aggressive.

On another note, to give more info, this is the Y of the roof that it has to be in order to not seep

This is the Y of the roof that is seeping in

3 Likes

There’s a list of parameters at the top of the Rain module. You can modify these directly if your map has special requirements such as thin roofs.

It’s not going to be possible to completely stop the effect from protruding since these are large particles so they might stick through the ground at certain camera rotations. They have to sink into the ground a bit to sell the illusion, if they stop before the ground it will look fake, but if that’s more desirable for your experience that is a trade-off you can make yourself, it’s all open-source and easy to edit.

2 Likes

Could you screenshot the area of that specific parameter? I’ve tried messing around with all of the parameters, and they did nothing good.

1 Like

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