-- initiate


for _, drop in pairs(DROPS:GetChildren()) do
	HandleDrop(drop)
end

local t	= 0

RunService.Stepped:connect(function(_, deltaTime)
	t	= t + deltaTime
	for drop, dropInfo in pairs(drops) do
		local offset	= drop.Position - CAMERA.CFrame.p
		
		if math.abs(offset.X) < UPDATE_RANGE and math.abs(offset.Y) < UPDATE_RANGE and math.abs(offset.Z) < UPDATE_RANGE then
			local localT	= t + (drop.Position.X + drop.Position.Z) * 0.2
			local cframe	= CFrame.new(drop.Position) * CFrame.new(0, math.sin(localT) * 0.2, 0) * CFrame.Angles(0, localT / 4, 0)
			
			for _, info in pairs(dropInfo.Parts) do
				info.Part.CFrame	= cframe * info.Offset
				local offset		= info.Part.Position - CAMERA.CFrame.p
				info.Outline.CFrame	= info.Part.CFrame + offset.Unit * OUTLINE_WIDTH * 2
			end
		end
	end
end)
