User:Buckethead101

From Legacy Roblox Wiki
Revision as of 03:33, 20 December 2008 by >Buckethead101 (Learn how to make rain in your place.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

How to Make Precipitation

So you have storm clouds over you place. Just storm clouds. No rain. Not yet, anyway.


Building The Droplet

So first, we need to build the droplet. I suggest you follow these guidlines:

In the properties of the brick that you want to be a droplet, set the size to 1,1,1
Set the shape to ball 
Set the color to any shade of blue
Set the Transparency to something between 0.1 and 0.4
Set the reflectance to 0.1 
Make sure you uncheck the CanCollide box, unless you want the droplets to stay on the ground. 

So now you have your droplet. Name it "Drop" (without quotes), drag it to a spot on the map where people might not find it, and anchor it.


The Script

Now comes the important part- the script.

First, we want it to loop.

while true do -- a continuous loop 

Now we need to put how long it will wait before making another.

wait(0.1) -- one tenth of a second 

Next comes the actual rain.

game.Workspace.Drop:clone() -- makes a copy of the droplet 

Here's our script so far:

while true do -- a continuous loop 
wait(0.1) -- one tenth of a second 
droplet = game.Workspace.Drop:clone() -- makes a clone of the droplet and tags it as "droplet" 

So far, so good. But wait; we have to define droplet's parent and position, and unanchor it.

droplet.Parent = game.Workspace -- makes droplet appear in the game 
droplet.Anchored = false -- unancors the droplet
droplet.Position = Vector3.new(math.random(-512,512),100,math.random(-512,512)) -- creates droplet 

Now lets see what we have.

while true do -- a continuous loop 
wait(0.1) -- one tenth of a second 
droplet = game.Lighting.Drop:clone() -- makes a clone of the droplet and tags it as "droplet"
droplet.Parent = game.Workspace -- makes droplet appear in the game 
droplet.Anchored = false -- unancors the droplet
droplet.Position = Vector3.new(math.random(-512,512),100,math.random(-512,512)) -- creates droplet 

Now all we have to do is end the script.

 end 

The Finished script

while true do -- a continuous loop 
wait(0.1) -- one tenth of a second 
droplet = game.Workspace.Drop:clone() -- makes a clone of the droplet and tags it as "droplet" 
droplet.Parent = game.Workspace -- makes droplet appear in the game 
droplet.Anchored = false -- unancors the droplet
droplet.Position = Vector3.new(math.random(-512,512),100,math.random(-512,512)) -- creates droplet 
end 

Just put that code into a script in workspace, and voilà- you should have rain falling from the sky when you go to your place! Feel free to edit the script as you please.