Download the module on its own and see the API.
If you can’t figure it out after trying it yourself first, use the #help-and-feedback:scripting-support category to get help. Support outside of the module/plugin itself is off-topic here.
Download the module on its own and see the API.
If you can’t figure it out after trying it yourself first, use the #help-and-feedback:scripting-support category to get help. Support outside of the module/plugin itself is off-topic here.
Some of the rain goes through thin-ish roofs, so you might want to put a transparent part on top of your structure.
The rain doesn’t set it’s transparency in the first 10 seconds. What can I do?
When making bug reports about this module please submit a .rbxl that reproduces the issue and give a specific description of what you see and what you expect to happen instead, otherwise I will have to back-and-forth with you several times to understand, and that’s not efficient usage of my time.
Bug reports that don’t have a repro and accurate description will be ignored.
Hi, how can I enable/disable the script/rain?
(from code)
like
Module:Enable()
Module:Disable()
You require the rain module and call the respective API. Please read the documentation.
local Rain = require(... route to the module here ...)
-- Call API on Rain
Rain:Enable()
As mentioned before in this topic, you might have to modify the roof thickness, or the constants in the module, to work with very thin roofs like that one.
@buildthomas What constants should I look to modify? I have large 2-3 stud thick roofs that are still being penetrated.
How do I use the API functions since I want to get my weather control script to use these rain effects?
In the function that toggles rain do I just simply insert Rain:Enable
so the function would look like this:
function Rain()
Rain:Enable
Raining = true
end
The function gets called to turn rain on by another part of the script.
or is they more to it like having to add a local to point to whatever script is needed for the API for function.
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.