Ok, I'm trying to finish my rain script but I don't know where to put a repeat script. Here is the script:
game.Workspace.Rainpart.Transparency = 1 game.Workspace.Rainpart.ParticleEmitter.Enabled = false wait(5) -- This is how much time before the initial clouds form. do game.Workspace.Rainpart.Transparency = 0.5 -- This is the transparency of the initial cloud game.Workspace.Rainpart.ParticleEmitter.Enabled = false -- Don't change this! wait(2.5) -- When changing this...change the number in between 2 and 5. game.Workspace.Rainpart.Transparency = 0 -- This shows the transparency of the main cloud. game.Workspace.Rainpart.ParticleEmitter.Enabled = true game.Workspace.Rainpart.ParticleEmitter.Acceleration = 0,-20,0 game.Workspace.Rainpart.ParticleEmitter.Lifetime = 10,20 game.Workspace.Rainpart.ParticleEmitter.Rate = 50 game.Workspace.Rainpart.ParticleEmitter.Speed = 5 wait(7.5) game.Workspace.Rainpart.Transparency = 1 game.Workspace.Rainpart.ParticleEmitter.Enabled = false wait(5) end
All I need to finish this is where to put a repeat script. Does anyone know where I should put a repeat script?
ParticleEmitters will continue forever when enabled. You should make the ParticleEmitter already exist and placed correctly.
Now, I'll assume at some point you'll want it to stop then continue. So, assuming you did what I mentioned and the part with ParticleEmitter already exists and all the properties are correct, leave it enabled or disabled at first so it will appear raining.
Here's a script to turn it on/off:
while true do wait(5)-- Wait 5 before starting rain game.Workspace.Rainpart.Transparency = 0 game.Workspace.Rainpart.ParticleEmitter.Enabled = true wait(5) -- Wait 5 then stop raining game.Workspace.Rainpart.Transparency = 1 game.Workspace.Rainpart.ParticleEmitter.Enabled = false end
This makes it much easier to work your cloud.
To make a part (In your case cloud) appear and disappear, you can use a
while true do loop.
All you'll be doing is changing the transparency and then using a wait so nothing will happen for that amount of time, then change the transparency again, with another wait then this will repeat. Look bellow for a script example!
while true do -- endless loop! No waits will crash studio/game!! game.Workspace.Cloud.Transparency = 0 -- I'm saying cloud just as an example wait(10) --This cloud will have 0 transparency for 10 second because the script is waiting 10 seconds before doing the code bellow! game.Workspace.Cloud.Transparency = 1 wait(10) -- This will wait 10 seconds before replaying the script(After 10 seconds it will switch to the code making it have 0 transparency and so on) end