i also managed to make the lightning parts invisible and mute the sound but that was only possible with a script inside of serverscriptservice so that wont work because im using “math.random” in my rain cycle local script which is located in starterplayerscripts
You can just exit the function in the ModuleScript when it is not raining - and run another one.
Won’t bother to read that atrocious code.
but im using math.random so i cant tell when it is gonna rain or not
i got the lightning script from here:
im just trying to make it work with my rain cycle script
i arleady made a topic on this:
i also showed my attempt there, but lets not go off topic and just plz tell me how to disable module script using local script
@KingxSlavy already answered for you: RemoteEvent.
Again, disabling a script while it’s running won’t halt execution.
To do this, exit the thunder function in the ModuleScript when the weather is not day. For that:
if weather == day then
Lightning.StopThunder()
end
And have said function do the rest.
Ah, said function does not exist. Code it yourself.
Nor was the example intended to be functional. I’m on mobile, can’t do much. However, we’re trying to help, if you don’t listen, we can’t do anything.
but i didnt mean to use the rain script that the lightning script came with i meant to use mine
yo wait i came up with a smart idea
Did you not remove the old rain script then? Also, what’s your rain script?
This time please codeblock it.
-- this is a codeblock.
what if i edit the time when the rain starts (yk the time in lighting) and stop the module script if that specific time has come
is that possible? cus i dont want to waste my time doing that if it dosent work ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ ㅤ
Do I have to tell you again that the module won’t stop running even when you disable it?
oh i sent my rain script, idk how to remove the rain script so i just set the rain part transparent and muted the rain sound
i meant like put Weather:Disable() dosent that work?
No. It is not a method within the class. You would have to create it yourself.
but i did that in my script and it worked
i arleady tried that and i got a red line for some reason idk why i got a red line
Where were you getting that syntax error?
i dont remember cus i did a long time ago, like a day ago