--These values are angles, so a good value for very strong wind is 45
-----------------
--[[MAIN CODE]]--
-----------------

function CircleCFrame(Origin) --Able to cast a CFrame in a circle around an origin point.
	local X = math.random(0, EffectRadius) - (EffectRadius / 2)
	local Z = math.random(0, EffectRadius) - (EffectRadius / 2)
	local Y = math.random(0, EffectRadius) + 5
	return CFrame.new(Origin) * CFrame.new(X, Y, Z)
end

function CreateRain(OriginPoint)
	--Create
	local Part = Instance.new("Part")
	Part.TopSurface = Enum.SurfaceType.Smooth
	Part.BottomSurface = Enum.SurfaceType.Smooth
	Part.CanCollide = false
	Part.Size = Vector3.new(DropWidth, DropLength, DropWidth)
	Part.Color = Color
	Part.Material = Material
	Part.Transparency = 0.25
	Part.CFrame = CircleCFrame(OriginPoint)
	Part.Orientation = Vector3.new(X_SPEED, 0, Z_SPEED)
	Part.Velocity = Part.CFrame.upVector * -100

	--Parent
	Part.Parent = workspace.CurrentCamera
	
	game:GetService("Debris"):AddItem(Part, 10)
end

while wait(1/Rate) do
	CreateRain(workspace.CurrentCamera.CoordinateFrame.p)
end
