It's a really simple rain script, however I'm new to this.
Here's the script
01 | if game.Lighting.TimeOfDay > "04:00:00" then |
02 | for i = 1 , 10 * 100000 do |
03 | while true do |
04 | wait() |
05 | part = Instance.new( "Part" , game.Workspace) |
06 | part.Transparency = 0.4 |
07 | part.BrickColor = BrickColor.new( "Toothpaste" ) |
08 | part.Size = Vector 3. new(. 5 , 1.75 ,. 5 ) |
09 | part.CanCollide = false |
10 | part.Material = "Neon" |
11 | part.Position = Vector 3. new(math.random(- 100 , 100 ), 100 , math.random(- 100 , 100 )) |
12 | wait() |
13 | elseif |
14 | game.Lighting.TimeOfDay < "04:00:00" |
15 | ~ = nil then |
16 | end |
17 | end |
18 | end |
The error is: 'end' expected (to close 'while' at line 3) near 'elseif' I can't seem to fix it.
Hello there, It appears you are missing a end to close the instructions. Properly indenting can really help you out in finding what you are doing wrong! :)
01 | while true do |
02 | if game.Lighting.TimeOfDay > "04:00:00" then |
03 | for i = 1 , 100 do |
04 | part = Instance.new( "Part" , game.Workspace) |
05 | part.Transparency = 0.4 |
06 | part.BrickColor = BrickColor.new( "Toothpaste" ) |
07 | part.Size = Vector 3. new(. 5 , 1.75 ,. 5 ) |
08 | part.CanCollide = false |
09 | part.Material = "Neon" |
10 | part.Position = Vector 3. new(math.random(- 100 , 100 ), 10 ,math.random(- 100 , 100 )) |
11 | wait() |
12 | end |
13 | end |
14 | wait() |
15 | end |