An answer was already given earlier in this thread – please read through the topic before responding:
If you need additional help, please use #help-and-feedback:scripting-support, as this is not a support topic for basic scripting questions.
An answer was already given earlier in this thread – please read through the topic before responding:
If you need additional help, please use #help-and-feedback:scripting-support, as this is not a support topic for basic scripting questions.
Thanks for the fast response. I installed the rain effects using the plugin. I can understand how to do the require thing but one thing. Where is the default path for the module when installed through the plugin? I tried referencing game.StarterPlayer.RainScript.Rain
but to no avail. I do know scripting since I made the weather system for my game that does more. It’s just that I need to modify it to get this rain module working with it.
You should download the module separately and put it wherever it makes sense to you, then use that module directly. The rain plugin is provided for non-scripters to quickly insert it into their experiences. It is not intended that you insert the module via the plugin and then try to access it from other scripts (because it’s inconvenient – just download the module and put it where you need it to be in whatever place makes sense to you).
Oh wow looks great! Does it ever cause any lag to the game? I am making a game that i might wanna use this for, but sometimes i try inserting a skybox or something and the whole game lags like crazy even when i delete it, so i was just wanting to know if it is completely safe to use.
It should be lightweight enough to use in games. It was used in the Hardboiled City world in Egg Hunt: The Great Yolktales - Roblox which supported iPhone 4S+.
Ok thank you! this will be really useful for me to use
I read through the posts but unless I missed something, there was no mention about collision with water.
Is there a way to make it not rain when underwater? Thanks.
Raycasting doesn’t work on Terrain water unfortunately. You can submit a feature request to Roblox about this if you want. (maybe one already exists somewhere)
If your water is generally flat and it’s easy to cover it with a part, maybe add a transparent part on the surface level of the water that doesn’t collide with anything else, and then add that as a collision for the rain with the provided API. Let me know more about your use case if that won’t work and maybe I could make some changes to the module, although generally this is hard to solve because there is no real way to efficiently check programmatically if there is Terrain water in the way.
I could probably hack something to check for water, and depth of water by looking at a column of terrain in my current position, and see if from my pos there is more than one voxel of water above me, and manually turn the rain on or off is its enabled.
I had just thought I was missing something.
I think the raycasting with water issue is from where the ray is cast, because if I have a layer of water over me (such as I am in a air pocket under water) it detects the water as a roof, and I get no rain
It looks like this is an option for the raycast API, I’m pretty sure you can detect terrain water.
It looks as though you are casting from the camera.cframe.p, towards the -raindirection * scanheight
So I assume this fires an upward ray from camera to ceiling.
Would it be possible to scan from the scanheight, point relative to camera.cframe, and fire it towards camera.cframe so you are hitting the top most ‘roof’ as collision (as long as scanheight is higher than the top of your water or anything tha would be a ‘roof’ in the map, I think this would solve the water issue.
Looks like it’s possible to make this work with Terrain water then, I’ll make that change later.
There is a ray fired from bottom to top that checks if the player is standing under cover, but this is not what is used to determine whether to put rain in an area. That’s done by a separate part of the code which does cast from top to bottom for each rain position, as you explain. So that should not be any issue.
This is awsome! But I think you should make it so the textures reset to normal if no texture ID is inserted
Thanks for the feedback and future fix. This rain really works well for large outdoor areas, especially a tropical rain feeling.
A very nice plugin, but is there a way to make the rain appear for 10 minutes and goes out for 15 minutes then comesback again?
You can use the underlying module for that. I’m not going to program this behavior into the plugin, because that is way too broad of a scope for the plugin to handle. The module has all the API you need to accomplish rain cycles on top of the module.
Rain:SetCollisionMode(Rain.CollisionMode.Blacklist, model)
I read the API, but after doing this, the rain is still blocked by the parts of the model. Is it done in another manner? I didn’t quite grasp it.
Thanks a ton! I was needing this for a sky highway tornado stage. Thanks!
Please provide a self-contained example in a .rbxl file so I can help you out. I don’t know what model
is here.
Like for an usual model with basic parts. If you put that line in a script in ServerScriptService, would it let rain pass through it?