User:Buckethead101: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Buckethead101
Learn how to make rain in your place.
 
>JulienDethurens
Nominated for deletion.
 
(20 intermediate revisions by one other user not shown)
Line 1: Line 1:
== How to Make Precipitation ==
{{delete}}
 
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:
 
<pre>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. </pre>
 
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.
<pre>while true do -- a continuous loop </pre>
Now we need to put how long it will wait before making another.
<pre>wait(0.1) -- one tenth of a second </pre>
Next comes the actual rain.
<pre>game.Workspace.Drop:clone() -- makes a copy of the droplet </pre>
Here's our script so far:
<pre>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" </pre>
So far, so good. But wait; we have to define droplet's parent and position, and unanchor it.
<pre>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 </pre>
Now lets see what we have.
<pre>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 </pre>
Now all we have to do is end the script.
<pre> end </pre>
 
== The Finished script ==
<pre>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 </pre>
 
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.

Latest revision as of 22:54, 5 May 2012

This page has been nominated for deletion